File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ class TestVarID : public TestFixture {
102102 TEST_CASE (varid70); // #12660 - function
103103 TEST_CASE (varid71); // #12676 - wrong varid in uninstantiated templated constructor
104104 TEST_CASE (varid72);
105+ TEST_CASE (varid73);
105106 TEST_CASE (varid_for_1);
106107 TEST_CASE (varid_for_2);
107108 TEST_CASE (varid_for_3);
@@ -1409,6 +1410,14 @@ class TestVarID : public TestFixture {
14091410 ASSERT_EQUALS (expected1, tokenize (code1));
14101411 }
14111412
1413+ void varid73 () {
1414+ const char code[] = " namespace a { int x; };\n "
1415+ " namespace b { int x = a::x; };\n " ;
1416+ const char expected[] = " 1: namespace a { int x@1 ; } ;\n "
1417+ " 2: namespace b { int x@2 ; x@2 = a :: x@1 ; } ;\n " ;
1418+ ASSERT_EQUALS (expected, tokenize (code));
1419+ }
1420+
14121421 void varid_for_1 () {
14131422 const char code[] = " void foo(int a, int b) {\n "
14141423 " for (int a=1,b=2;;) {}\n "
You can’t perform that action at this time.
0 commit comments