Replace 2 invalid test cases added while fixing #5793 by a valid one
This commit is contained in:
parent
fc592673a1
commit
f2e5da290b
|
@ -522,13 +522,8 @@ private:
|
||||||
TODO_ASSERT_EQUALS("[test.cpp:3]: (error) Deallocation of an auto-variable results in undefined behaviour.\n", "", errout.str());
|
TODO_ASSERT_EQUALS("[test.cpp:3]: (error) Deallocation of an auto-variable results in undefined behaviour.\n", "", errout.str());
|
||||||
|
|
||||||
check("void foo() {\n"
|
check("void foo() {\n"
|
||||||
" int& intref = Getter();\n"
|
" const intPtr& intref = Getter();\n"
|
||||||
" delete *intref;\n"
|
" delete intref;\n"
|
||||||
"}");
|
|
||||||
ASSERT_EQUALS("", errout.str());
|
|
||||||
check("void foo() {\n"
|
|
||||||
" FOO& fooref = Getter();\n"
|
|
||||||
" delete *fooref;\n"
|
|
||||||
"}");
|
"}");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue