#8482: Added another regression test

This commit is contained in:
orbitcowboy 2021-08-08 10:55:10 +02:00
parent dc65f9b1a7
commit 0b36ece049
1 changed files with 17 additions and 0 deletions

View File

@ -1473,6 +1473,23 @@ private:
" (void)f->x;\n" " (void)f->x;\n"
"}\n", true); "}\n", true);
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
check("typedef struct\n"
"{\n"
" int x;\n"
"} F;\n"
"\n"
"static void foo(F* f)\n"
"{\n"
" if( !f || f->x == 0 )\n"
" {\n"
" if( !f )\n"
" return;\n"
" }\n"
"\n"
" (void)f->x;\n"
"}", true);
ASSERT_EQUALS("", errout.str());
} }
void nullpointer32() { // #8460 void nullpointer32() { // #8460