MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / constructorMemberInitialization

Method constructorMemberInitialization

lib/symboldatabase.cpp:3433–3442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3431}
3432
3433const Token * Function::constructorMemberInitialization() const
3434{
3435 if (!isConstructor() || !arg)
3436 return nullptr;
3437 if (Token::simpleMatch(arg->link(), ") :"))
3438 return arg->link()->next();
3439 if (Token::simpleMatch(arg->link(), ") noexcept (") && arg->link()->linkAt(2)->strAt(1) == ":")
3440 return arg->link()->linkAt(2)->next();
3441 return nullptr;
3442}
3443
3444bool Function::isSafe(const Settings &settings) const
3445{

Callers 8

valueFlowAfterMoveFunction · 0.80
checkConstVariableMethod · 0.80
traverseMethod · 0.80
constructorsMethod · 0.80

Calls 4

isConstructorFunction · 0.85
nextMethod · 0.80
linkAtMethod · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected