Remove bailout. It hides lots of warnings for real code to avoid FP in unused templates.
This commit is contained in:
parent
d909ac8565
commit
2a4be5ae1c
|
@ -145,13 +145,6 @@ void CheckClass::constructors()
|
|||
if (!func.hasBody() || !(func.isConstructor() || func.type == Function::eOperatorEqual))
|
||||
continue;
|
||||
|
||||
// Bail: If initializer list is not recognized as a variable or type then skip since parsing is incomplete
|
||||
if (func.type == Function::eConstructor) {
|
||||
const Token *initList = func.constructorMemberInitialization();
|
||||
if (Token::Match(initList, ": %name% (") && initList->next()->tokType() == Token::eName)
|
||||
break;
|
||||
}
|
||||
|
||||
// Mark all variables not used
|
||||
clearAllVar(usage);
|
||||
|
||||
|
|
|
@ -3885,7 +3885,8 @@ private:
|
|||
"};\n"
|
||||
"template<class T1, class T2>\n"
|
||||
"A<B<T1, T2>>::A() : m_value(false) {}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
// TODO: Avoid FP somehow
|
||||
TODO_ASSERT_EQUALS("", "[test.cpp:10]: (warning) Member variable 'A::m_value' is not initialized in the constructor.\n", errout.str());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue