We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92f9b2e commit 199552aCopy full SHA for 199552a
1 file changed
test/testuninitvar.cpp
@@ -7776,6 +7776,14 @@ class TestUninitVar : public TestFixture {
7776
" return (&s)->y;\n"
7777
"}\n");
7778
ASSERT_EQUALS("[test.cpp:5:16]: (error) Uninitialized variable: s.y [uninitvar]\n", errout_str());
7779
+
7780
+ valueFlowUninit("struct S { int* p; };\n" // #14640
7781
+ "void f() {\n"
7782
+ " int x;\n"
7783
+ " S s{ &x };\n"
7784
+ " *s.p = 0;\n"
7785
+ "}\n");
7786
+ ASSERT_EQUALS("", errout_str());
7787
}
7788
7789
void valueFlowUninitForLoop()
0 commit comments