Skip to content

Commit 3387438

Browse files
Update testother.cpp
1 parent 834a4bd commit 3387438

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎test/testother.cpp‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4249,6 +4249,14 @@ class TestOther : public TestFixture {
42494249
" return &(u.i);\n"
42504250
"}\n");
42514251
ASSERT_EQUALS("", errout_str());
4252+
4253+
check("typedef int I;\n" // #15167
4254+
"I f() {\n"
4255+
" I a[1] = { 0 };\n"
4256+
" return a[0];\n"
4257+
"}\n");
4258+
ASSERT_EQUALS("[test.cpp:3:7]: (style) Variable 'a' can be declared as const array [constVariable]\n",
4259+
errout_str());
42524260
}
42534261

42544262
void constParameterCallback() {

0 commit comments

Comments
 (0)