Skip to content

Commit 1b83565

Browse files
Update testincompletestatement.cpp
1 parent e0b61fb commit 1b83565

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/testincompletestatement.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,14 @@ class TestIncompleteStatement : public TestFixture {
750750
" g<sizeof(wchar_t)>();\n"
751751
"}\n");
752752
ASSERT_EQUALS("", errout_str());
753+
754+
check("struct S;\n" // #14664
755+
"S* a[1];\n"
756+
"void f() {\n"
757+
" a[0];\n"
758+
"}\n");
759+
ASSERT_EQUALS("[test.cpp:4:6]: (warning) Redundant code: Found unused array access. [constStatement]\n",
760+
errout_str());
753761
}
754762

755763
void vardecl() {

0 commit comments

Comments
 (0)