check that misused scope object does not pick nested class
This commit is contained in:
parent
386de53ff7
commit
dcc0f28f34
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue