uninitialized member: don't check private constructors
This commit is contained in:
parent
762ae69304
commit
8cd2979468
|
@ -45,6 +45,7 @@ private:
|
|||
|
||||
TEST_CASE(uninitVar1);
|
||||
TEST_CASE(uninitVarStream);
|
||||
TEST_CASE(privateCtor); // If constructor is private..
|
||||
}
|
||||
|
||||
// Check that base classes have virtual destructors
|
||||
|
@ -179,6 +180,20 @@ private:
|
|||
ASSERT_EQUALS(std::string(""), errout.str());
|
||||
}
|
||||
|
||||
|
||||
void privateCtor()
|
||||
{
|
||||
checkUninitVar("class Foo {\n"
|
||||
" int foo;\n"
|
||||
" Foo() { }\n"
|
||||
"};\n");
|
||||
|
||||
ASSERT_EQUALS(std::string(""), errout.str());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
REGISTER_TEST(TestClass)
|
||||
|
|
Loading…
Reference in New Issue