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

Function isVariableExprHidden

lib/checkother.cpp:4245–4258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4243}
4244
4245static bool isVariableExprHidden(const Token* tok)
4246{
4247 if (!tok)
4248 return false;
4249 if (!tok->astParent())
4250 return false;
4251 if (Token::simpleMatch(tok->astParent(), "*") && Token::simpleMatch(tok->astSibling(), "0"))
4252 return true;
4253 if (Token::simpleMatch(tok->astParent(), "&&") && Token::simpleMatch(tok->astSibling(), "false"))
4254 return true;
4255 if (Token::simpleMatch(tok->astParent(), "||") && Token::simpleMatch(tok->astSibling(), "true"))
4256 return true;
4257 return false;
4258}
4259
4260void CheckOtherImpl::checkKnownArgument()
4261{

Callers 1

checkKnownArgumentMethod · 0.85

Calls 2

astParentMethod · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected