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

Method hasLifetimeToken

lib/valueflow.cpp:1679–1687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1677}
1678
1679bool ValueFlow::hasLifetimeToken(const Token* tok, const Token* lifetime, const Settings& settings)
1680{
1681 bool result = false;
1682 getLifetimeTokens(tok, false, ErrorPath{}, [&](const Token* tok2) {
1683 result = tok2->exprId() == lifetime->exprId();
1684 return result;
1685 }, settings);
1686 return result;
1687}
1688
1689static const Token* getLifetimeToken(const Token* tok, ErrorPath& errorPath, const Settings& settings, bool* addressOf = nullptr)
1690{

Callers

nothing calls this directly

Calls 1

getLifetimeTokensFunction · 0.85

Tested by

no test coverage detected