File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
22 * Cppcheck - A tool for static C/C++ code analysis
3- * Copyright (C) 2007-2026 Cppcheck team.
3+ * Copyright (C) 2007-2025 Cppcheck team.
44 *
55 * This program is free software: you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published by
@@ -150,6 +150,7 @@ class TestVarID : public TestFixture {
150150 TEST_CASE (varid_in_class27);
151151 TEST_CASE (varid_in_class28);
152152 TEST_CASE (varid_in_class29);
153+ TEST_CASE (varid_in_class30);
153154 TEST_CASE (varid_namespace_1); // #7272
154155 TEST_CASE (varid_namespace_2); // #7000
155156 TEST_CASE (varid_namespace_3); // #8627
@@ -2403,6 +2404,18 @@ class TestVarID : public TestFixture {
24032404 ASSERT_EQUALS (expected, tokenize (code));
24042405 }
24052406
2407+ void varid_in_class30 () {
2408+ const char code[] = " void* p;\n " // #13443
2409+ " struct S {\n "
2410+ " void p();\n "
2411+ " };\n " ;
2412+ const char expected[] = " 1: void * p@1 ;\n "
2413+ " 2: struct S {\n "
2414+ " 3: void p ( ) ;\n "
2415+ " 4: } ;\n " ;
2416+ ASSERT_EQUALS (expected, tokenize (code));
2417+ }
2418+
24062419 void varid_namespace_1 () { // #7272
24072420 const char code[] = " namespace Blah {\n "
24082421 " struct foo { int x;};\n "
You can’t perform that action at this time.
0 commit comments