File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ class TestUnusedVar : public TestFixture {
249249 TEST_CASE (localvarDelete);
250250 TEST_CASE (localvarLambda); // #8941, #8948
251251 TEST_CASE (localvarStructuredBinding); // #10368
252+ TEST_CASE (localvarPtrToPtr);
252253
253254 TEST_CASE (localvarCppInitialization);
254255 TEST_CASE (localvarCpp11Initialization);
@@ -6958,6 +6959,16 @@ class TestUnusedVar : public TestFixture {
69586959 ASSERT_EQUALS (" " , errout_str ());
69596960 }
69606961
6962+ void localvarPtrToPtr () {
6963+ functionVariableUsage (" int main() {\n "
6964+ " int *p, **pp = &p;\n "
6965+ " int i = 123;\n "
6966+ " *pp = &i;\n "
6967+ " return *p;\n "
6968+ " }\n " );
6969+ ASSERT_EQUALS (" " , errout_str ());
6970+ }
6971+
69616972 void localvarCppInitialization () {
69626973 functionVariableUsage (" void foo() {\n "
69636974 " int buf[6];\n "
You can’t perform that action at this time.
0 commit comments