Skip to content

Commit c5c9435

Browse files
Update testincompletestatement.cpp
1 parent d95d10a commit c5c9435

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/testincompletestatement.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,11 @@ class TestIncompleteStatement : public TestFixture {
758758
"}\n");
759759
ASSERT_EQUALS("[test.cpp:4:6]: (warning) Redundant code: Found unused array access. [constStatement]\n",
760760
errout_str());
761+
762+
check("int f(int i) {\n" // #14889
763+
" return i ? 8 : ({ int x = 2; x; });\n"
764+
"}\n");
765+
ASSERT_EQUALS("", errout_str());
761766
}
762767

763768
void vardecl() {

0 commit comments

Comments
 (0)