add test case for false negatives introduced by fix for 3106

This commit is contained in:
Robert Reif 2011-09-21 07:32:23 -04:00
parent 4d1dda10fa
commit de0f2dc1d0
1 changed files with 7 additions and 0 deletions

View File

@ -508,6 +508,13 @@ private:
" return x(&i) ? i : 0;\n"
"}\n");
ASSERT_EQUALS("", errout.str());
// Ticket #3106 - False negative
checkUninitVar("int f() {\n"
" int i;\n"
" return x() ? i : 0;\n"
"}\n");
TODO_ASSERT_EQUALS("[test.cpp:2]: (error) Uninitialized variable: y\n", "", errout.str());
}