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

Function endOfExpression

lib/checkstl.cpp:1106–1119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1104}
1105
1106static const Token* endOfExpression(const Token* tok)
1107{
1108 if (!tok)
1109 return nullptr;
1110 const Token* parent = tok->astParent();
1111 while (Token::simpleMatch(parent, "."))
1112 parent = parent->astParent();
1113 if (!parent)
1114 return tok->next();
1115 const Token* endToken = nextAfterAstRightmostLeaf(parent);
1116 if (!endToken)
1117 return parent->next();
1118 return endToken;
1119}
1120
1121void CheckStlImpl::invalidContainer()
1122{

Callers 1

invalidContainerMethod · 0.85

Calls 4

astParentMethod · 0.80
nextMethod · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected