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

Method getLifetimeVariable

lib/valueflow.cpp:1702–1708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1700}
1701
1702const Variable* ValueFlow::getLifetimeVariable(const Token* tok, ErrorPath& errorPath, const Settings& settings, bool* addressOf)
1703{
1704 const Token* tok2 = getLifetimeToken(tok, errorPath, settings, addressOf);
1705 if (tok2 && tok2->variable())
1706 return tok2->variable();
1707 return nullptr;
1708}
1709
1710const Variable* ValueFlow::getLifetimeVariable(const Token* tok, const Settings& settings)
1711{

Callers

nothing calls this directly

Calls 2

getLifetimeTokenFunction · 0.85
variableMethod · 0.80

Tested by

no test coverage detected