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

Function getParentVar

lib/checkautovariables.cpp:544–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542}
543
544static const Variable* getParentVar(const Token* tok)
545{
546 if (!tok)
547 return nullptr;
548 if (Token::simpleMatch(tok, "."))
549 return getParentVar(tok->astOperand1());
550 return tok->variable();
551}
552
553static bool isAssignedToNonLocal(const Token* tok)
554{

Callers 2

isAssignedToNonLocalFunction · 0.85
checkVarLifetimeScopeMethod · 0.85

Calls 3

astOperand1Method · 0.80
variableMethod · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected