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

Function isAliasOf

lib/astutils.cpp:1053–1072  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1051}
1052
1053bool isAliasOf(const Token *tok, nonneg int varid, bool* inconclusive)
1054{
1055 if (tok->varId() == varid)
1056 return false;
1057 // NOLINTNEXTLINE(readability-use-anyofallof) - TODO: fix this / also Cppcheck false negative
1058 for (const ValueFlow::Value &val : tok->values()) {
1059 if (!val.isLocalLifetimeValue())
1060 continue;
1061 if (val.tokvalue->varId() == varid) {
1062 if (val.isInconclusive()) {
1063 if (inconclusive)
1064 *inconclusive = true;
1065 else
1066 continue;
1067 }
1068 return true;
1069 }
1070 }
1071 return false;
1072}
1073
1074bool isAliasOf(const Token* tok, const Token* expr, nonneg int* indirect)
1075{

Callers 3

isContainerSizeChangedFunction · 0.70
isAliasedFunction · 0.70
isExpressionChangedAtFunction · 0.70

Calls 6

astIsPointerFunction · 0.85
findAstNodeFunction · 0.85
isUnaryOpMethod · 0.80
astOperand1Method · 0.80
isImpossibleMethod · 0.80
isInconclusiveMethod · 0.45

Tested by

no test coverage detected