Test false auto_ptr positive.
Assignments after a function returning an auto_ptr is declared are detected as auto_ptr assignments!
This commit is contained in:
parent
3cfef6285c
commit
c983608d88
|
@ -1376,6 +1376,12 @@ private:
|
|||
"}\n");
|
||||
ASSERT_EQUALS("[test.cpp:6]: (style) Copy 'auto_ptr' pointer to another do not create two equal objects since one has lost its ownership of the pointer.\n", errout.str());
|
||||
|
||||
check("std::auto_ptr<A> function();\n"
|
||||
"int quit;"
|
||||
"void f() { quit = true; }\n"
|
||||
);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
// ticket #748
|
||||
check("void f() \n"
|
||||
"{\n"
|
||||
|
|
Loading…
Reference in New Issue