We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7803ea commit d3bb84cCopy full SHA for d3bb84c
test/testuninitvar.cpp
@@ -2333,11 +2333,23 @@ class TestUninitVar : public TestFixture {
2333
"}");
2334
ASSERT_EQUALS("", errout.str());
2335
2336
+ checkUninitVar("int foo() {\n"
2337
+ " int i;\n"
2338
+ " return (int&)i + 2;\n"
2339
+ "}");
2340
+ ASSERT_EQUALS("[test.cpp:3]: (error) Uninitialized variable: i\n", errout.str());
2341
+
2342
checkUninitVar("void foo() {\n"
2343
" int i;\n"
2344
" dostuff(*&i, 0);\n" // <- *& is not use
2345
2346
2347
2348
2349
2350
+ " return *&i;\n"
2351
2352
2353
}
2354
2355
void uninitvar2() {
0 commit comments