We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b5df68 commit bb98ccfCopy full SHA for bb98ccf
1 file changed
test/testuninitvar.cpp
@@ -3588,6 +3588,12 @@ class TestUninitVar : public TestFixture {
3588
" }\n"
3589
"}");
3590
TODO_ASSERT_EQUALS("error", "", errout.str());
3591
+
3592
+ valueFlowUninit("void f ( void ){\n" // #9313 - FN
3593
+ " int *p;\n"
3594
+ " int a[ 2 ] = { [ 0 ] = *p++, [ 1 ] = 1 };\n"
3595
+ "}");
3596
+ ASSERT_EQUALS("[test.cpp:3]: (error) Uninitialized variable: p\n", errout.str());
3597
}
3598
3599
void uninitStructMember() { // struct members
0 commit comments