From 78ac8c5ff6a639684e971cfb61b0c2941bf8ec6e Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 15 May 2024 16:19:41 +0200 Subject: [PATCH] Update testvarid.cpp --- test/testvarid.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/testvarid.cpp b/test/testvarid.cpp index 02ea62f6f3d..6399f2a1405 100644 --- a/test/testvarid.cpp +++ b/test/testvarid.cpp @@ -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() {