We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc65f9b commit 0b36eceCopy full SHA for 0b36ece
test/testnullpointer.cpp
@@ -1473,6 +1473,23 @@ class TestNullPointer : public TestFixture {
1473
" (void)f->x;\n"
1474
"}\n", true);
1475
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
1484
+ " if( !f || f->x == 0 )\n"
1485
+ " {\n"
1486
+ " if( !f )\n"
1487
+ " return;\n"
1488
+ " }\n"
1489
1490
+ " (void)f->x;\n"
1491
+ "}", true);
1492
+ ASSERT_EQUALS("", errout.str());
1493
}
1494
1495
void nullpointer32() { // #8460
0 commit comments