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

Function followReferences

lib/astutils.cpp:1400–1411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1398}
1399
1400const Token* followReferences(const Token* tok, ErrorPath* errors)
1401{
1402 if (!tok)
1403 return nullptr;
1404 auto refs = followAllReferencesInternal(tok, true, false);
1405 if (refs.size() == 1) {
1406 if (errors)
1407 *errors = std::move(refs.front().errors);
1408 return refs.front().token;
1409 }
1410 return nullptr;
1411}
1412
1413static bool isSameLifetime(const Token * const tok1, const Token * const tok2)
1414{

Callers 1

isSameExpressionFunction · 0.85

Calls 3

frontMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected