Skip to content

Commit

Permalink
Update testvarid.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored May 15, 2024
1 parent 1a16c4e commit 78ac8c5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/testvarid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2508,6 +2508,16 @@ class TestVarID : public TestFixture {
"5: A :: A ( const Matrix & m@3 ) throw ( e ) : work@1 ( 0 )\n"
"6: { }\n",
tokenize(code10));

const char code11[] = "struct S {\n" // #12733
" explicit S(int& r) : a{ int{ 1 } }, b{ r } {}\n"
" int a, &b;\n"
"};";
ASSERT_EQUALS("1: struct S {\n"
"2: explicit S ( int & r@1 ) : a@2 { int { 1 } } , b@3 { r@1 } { }\n"
"3: int a@2 ; int & b@3 ;\n"
"4: } ;\n",
tokenize(code11));
}

void varid_initListWithBaseTemplate() {
Expand Down

0 comments on commit 78ac8c5

Please sign in to comment.