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

Function isAliased

lib/astutils.cpp:1111–1122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1109}
1110
1111static bool isAliased(const Token *startTok, const Token *endTok, nonneg int varid)
1112{
1113 if (!precedes(startTok, endTok))
1114 return false;
1115 for (const Token *tok = startTok; tok != endTok; tok = tok->next()) {
1116 if (Token::Match(tok, "= & %varid% ;", varid))
1117 return true;
1118 if (isAliasOf(tok, varid))
1119 return true;
1120 }
1121 return false;
1122}
1123
1124bool exprDependsOnThis(const Token* expr, bool onVar, nonneg int depth)
1125{

Callers 2

multiCondition2Method · 0.85
followVariableExpressionFunction · 0.85

Calls 3

precedesFunction · 0.85
nextMethod · 0.80
isAliasOfFunction · 0.70

Tested by

no test coverage detected