Uninitialized variables; Add todo test case

This commit is contained in:
Daniel Marjamäki 2021-05-28 18:09:43 +02:00
parent 5f0fe1dfe7
commit a994bd5ba5
1 changed files with 10 additions and 0 deletions

View File

@ -888,6 +888,16 @@ private:
"}");
ASSERT_EQUALS("", errout.str());
checkUninitVar("int bar(int x) {\n"
" int n;\n"
" if ( x == 23)\n"
" n = 1;\n"
" else if ( x == 11 )\n"
" n = 2;\n"
" return n;\n"
"}");
TODO_ASSERT_EQUALS("error", "", errout.str());
checkUninitVar("int foo()\n"
"{\n"
" int i;\n"