Skip to content

Commit 0b36ece

Browse files
committed
#8482: Added another regression test
1 parent dc65f9b commit 0b36ece

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/testnullpointer.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,23 @@ class TestNullPointer : public TestFixture {
14731473
" (void)f->x;\n"
14741474
"}\n", true);
14751475
ASSERT_EQUALS("", errout.str());
1476+
1477+
check("typedef struct\n"
1478+
"{\n"
1479+
" int x;\n"
1480+
"} F;\n"
1481+
"\n"
1482+
"static void foo(F* f)\n"
1483+
"{\n"
1484+
" if( !f || f->x == 0 )\n"
1485+
" {\n"
1486+
" if( !f )\n"
1487+
" return;\n"
1488+
" }\n"
1489+
"\n"
1490+
" (void)f->x;\n"
1491+
"}", true);
1492+
ASSERT_EQUALS("", errout.str());
14761493
}
14771494

14781495
void nullpointer32() { // #8460

0 commit comments

Comments
 (0)