We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11319a3 commit 2d326c0Copy full SHA for 2d326c0
1 file changed
test/testleakautovar.cpp
@@ -428,6 +428,15 @@ class TestLeakAutoVar : public TestFixture {
428
" std::string *str = new std::string;"
429
"}", true);
430
TODO_ASSERT_EQUALS("[test.cpp:2]: (error) Memory leak: str\n", "", errout.str());
431
+
432
+ check("class TestType {\n" // #9028
433
+ "public:\n"
434
+ " char ca[12];\n"
435
+ "};\n"
436
+ "void f() {\n"
437
+ " TestType *tt = new TestType();\n"
438
+ "}", true);
439
+ ASSERT_EQUALS("[test.cpp:7]: (error) Memory leak: tt\n", errout.str());
440
}
441
442
void realloc1() {
0 commit comments