add test case for false negatives introduced by fix for 3106
This commit is contained in:
parent
4d1dda10fa
commit
de0f2dc1d0
|
@ -508,6 +508,13 @@ private:
|
||||||
" return x(&i) ? i : 0;\n"
|
" return x(&i) ? i : 0;\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("", errout.str());
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue