Fixed #2425 (segmentation fault of cppcheck)

This commit is contained in:
Robert Reif 2011-01-07 18:58:14 +01:00 committed by Daniel Marjamäki
parent 9b66f7a754
commit 5f078da7ad
1 changed files with 16 additions and 0 deletions

View File

@ -184,6 +184,7 @@ private:
TEST_CASE(symboldatabase6); // ticket #2221
TEST_CASE(symboldatabase7); // ticket #2230
TEST_CASE(symboldatabase8); // ticket #2252
TEST_CASE(symboldatabase9); // ticket #2525
}
// Check the operator Equal
@ -5408,6 +5409,21 @@ private:
ASSERT_EQUALS("", errout.str());
}
void symboldatabase9()
{
// ticket #2425 - segmentation fault
checkConst("class CHyperlink : public CString\n"
"{\n"
"public:\n"
" const CHyperlink& operator=(LPCTSTR lpsz) {\n"
" CString::operator=(lpsz);\n"
" return *this;\n"
" }\n"
"};\n");
ASSERT_EQUALS("", errout.str());
}
};
REGISTER_TEST(TestClass)