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

Function isLeafDot

lib/astutils.cpp:3504–3514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3502}
3503
3504bool isLeafDot(const Token* tok)
3505{
3506 if (!tok)
3507 return false;
3508 const Token * parent = tok->astParent();
3509 if (!Token::simpleMatch(parent, "."))
3510 return false;
3511 if (parent->astOperand2() == tok && !Token::simpleMatch(parent->astParent(), "."))
3512 return true;
3513 return isLeafDot(parent);
3514}
3515
3516ExprUsage getExprUsage(const Token* tok, int indirect, const Settings& settings)
3517{

Callers 3

valueFlowUninitMethod · 0.85
isSimpleExprFunction · 0.85
getExprUsageFunction · 0.85

Calls 3

astParentMethod · 0.80
astOperand2Method · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected