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

Function isVariableExpression

lib/checkother.cpp:4233–4243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4231}
4232
4233static bool isVariableExpression(const Token* tok)
4234{
4235 if (tok->varId() != 0)
4236 return true;
4237 if (Token::simpleMatch(tok, "."))
4238 return isVariableExpression(tok->astOperand1()) &&
4239 isVariableExpression(tok->astOperand2());
4240 if (Token::simpleMatch(tok, "["))
4241 return isVariableExpression(tok->astOperand1());
4242 return false;
4243}
4244
4245static bool isVariableExprHidden(const Token* tok)
4246{

Callers 1

checkKnownArgumentMethod · 0.85

Calls 3

astOperand1Method · 0.80
astOperand2Method · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected