@@ -96,7 +96,7 @@ class TestVarID : public TestFixture {
9696 TEST_CASE (varid61); // #4988 inline function
9797 TEST_CASE (varid62);
9898 TEST_CASE (varid63);
99- TEST_CASE (varid64); // #9928 - extern const char (*x[256])
99+ TEST_CASE (varid64); // #9922 - extern const char (*x[256])
100100 TEST_CASE (varid65); // #10936
101101 TEST_CASE (varid66);
102102 TEST_CASE (varid67); // #11711 - NOT function pointer
@@ -147,6 +147,7 @@ class TestVarID : public TestFixture {
147147 TEST_CASE (varid_in_class24);
148148 TEST_CASE (varid_in_class25);
149149 TEST_CASE (varid_in_class26);
150+ TEST_CASE (varid_in_class27);
150151 TEST_CASE (varid_namespace_1); // #7272
151152 TEST_CASE (varid_namespace_2); // #7000
152153 TEST_CASE (varid_namespace_3); // #8627
@@ -2285,6 +2286,18 @@ class TestVarID : public TestFixture {
22852286 ASSERT_EQUALS (expected, tokenize (code, true ));
22862287 }
22872288
2289+ void varid_in_class27 () {
2290+ const char code[] = " struct S {\n " // #13291
2291+ " int** pp;\n "
2292+ " void f() { int x(*pp[0]); }\n "
2293+ " };\n " ;
2294+ const char expected[] = " 1: struct S {\n "
2295+ " 2: int * * pp@1 ;\n "
2296+ " 3: void f ( ) { int x@2 ( * pp@1 [ 0 ] ) ; }\n "
2297+ " 4: } ;\n " ;
2298+ ASSERT_EQUALS (expected, tokenize (code, true ));
2299+ }
2300+
22882301 void varid_namespace_1 () { // #7272
22892302 const char code[] = " namespace Blah {\n "
22902303 " struct foo { int x;};\n "
0 commit comments