added todo testcase for ticket 3597

This commit is contained in:
Ettl Martin 2012-05-01 14:26:34 +02:00
parent d5442280b1
commit 28510bdd38
1 changed files with 10 additions and 0 deletions

View File

@ -72,6 +72,16 @@ private:
}
void uninitvar1() {
// Ticket #3597
checkUninitVar("int f() {\n"
" int a;\n"
" int b = 1;\n"
" (b += a) = 1;\n"
" return b*a;\n"
"}\n");
TODO_ASSERT_EQUALS("[test.cpp:4]: (error) Uninitialized variable: a\n","", errout.str());
// Ticket #2207 - False negative
checkUninitVar("void foo() {\n"
" int a;\n"