Ticket #9028 was fixed in 5800692fa1
, add a test case where the
class definition is seen.
This commit is contained in:
parent
11319a397a
commit
2d326c011d
|
@ -428,6 +428,15 @@ private:
|
|||
" std::string *str = new std::string;"
|
||||
"}", true);
|
||||
TODO_ASSERT_EQUALS("[test.cpp:2]: (error) Memory leak: str\n", "", errout.str());
|
||||
|
||||
check("class TestType {\n" // #9028
|
||||
"public:\n"
|
||||
" char ca[12];\n"
|
||||
"};\n"
|
||||
"void f() {\n"
|
||||
" TestType *tt = new TestType();\n"
|
||||
"}", true);
|
||||
ASSERT_EQUALS("[test.cpp:7]: (error) Memory leak: tt\n", errout.str());
|
||||
}
|
||||
|
||||
void realloc1() {
|
||||
|
|
Loading…
Reference in New Issue