This commit is contained in:
Pete Johns 2011-02-01 19:52:44 +11:00
commit d2b6dc210b
1 changed files with 22 additions and 0 deletions

View File

@ -89,6 +89,7 @@ private:
TEST_CASE(testMisusedScopeObjectDoesNotPickLocalClassConstructors);
TEST_CASE(testMisusedScopeObjectDoesNotPickUsedObject);
TEST_CASE(testMisusedScopeObjectDoesNotPickPureC);
TEST_CASE(testMisusedScopeObjectDoesNotPickNestedClass);
TEST_CASE(trac2071);
TEST_CASE(trac2084);
@ -1358,6 +1359,27 @@ private:
ASSERT_EQUALS("", errout.str());
}
void testMisusedScopeObjectDoesNotPickNestedClass()
{
const char code[] = "class ios_base {\n"
"public:\n"
" class Init {\n"
" public:\n"
" };\n"
"};\n"
"class foo {\n"
"public:\n"
" foo();\n"
" void Init(int);\n"
"};\n"
"foo::foo() {\n"
" Init(0);\n"
"}\n";
check(code, "test.cpp");
ASSERT_EQUALS("", errout.str());
}
void trac2084()
{
check("#include <signal.h>\n"