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

Function match

lib/astutils.cpp:358–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358static bool match(const Token *tok, const std::string &rhs)
359{
360 if (tok->str() == rhs)
361 return true;
362 if (!tok->varId() && tok->hasKnownIntValue() && MathLib::toString(tok->getKnownIntValue()) == rhs)
363 return true;
364 return false;
365}
366
367const Token * astIsVariableComparison(const Token *tok, const std::string &comp, const std::string &rhs, const Token **vartok)
368{

Callers 9

matchMethod · 0.70
isSuppressedMethod · 0.70
analyzeLifetimeFunction · 0.70
getSymbolsFunction · 0.70
findMatchFunction · 0.70
isSameSymbolicValueFunction · 0.70
analyzeTokenFunction · 0.70
astIsVariableComparisonFunction · 0.70

Calls 4

getKnownIntValueMethod · 0.80
toStringFunction · 0.70
strMethod · 0.45
hasKnownIntValueMethod · 0.45

Tested by

no test coverage detected