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

Function followVariableExpressionError

lib/astutils.cpp:1248–1260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1246}
1247
1248static void followVariableExpressionError(const Token *tok1, const Token *tok2, ErrorPath* errors)
1249{
1250 if (!errors)
1251 return;
1252 if (!tok1)
1253 return;
1254 if (!tok2)
1255 return;
1256 ErrorPathItem item = std::make_pair(tok2, "'" + tok1->str() + "' is assigned value '" + tok2->expressionString() + "' here.");
1257 if (std::find(errors->cbegin(), errors->cend(), item) != errors->cend())
1258 return;
1259 errors->push_back(std::move(item));
1260}
1261
1262static SmallVector<ReferenceToken> followAllReferencesInternal(const Token* tok,
1263 bool temporary = true,

Callers 1

isSameExpressionFunction · 0.85

Calls 3

strMethod · 0.45
expressionStringMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected