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

Method isAlias

lib/vf_analyzers.cpp:1152–1168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150 }
1151
1152 bool isAlias(const Token* tok, bool& inconclusive) const override {
1153 if (value.isLifetimeValue())
1154 return false;
1155 for (const auto& m: {
1156 std::ref(getVars()), std::ref(getAliasedVars())
1157 }) {
1158 for (const auto& p:m.get()) {
1159 nonneg int const varid = p.first;
1160 const Variable* var = p.second;
1161 if (tok->varId() == varid)
1162 return true;
1163 if (isAliasOf(var, tok, varid, MakeSingleRange(value), &inconclusive))
1164 return true;
1165 }
1166 }
1167 return false;
1168 }
1169
1170 bool isGlobal() const override {
1171 const auto& vars = getVars();

Callers

nothing calls this directly

Calls 2

isAliasOfFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected