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

Method updateRecursive

lib/reverseanalyzer.cpp:123–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 }
122
123 bool updateRecursive(Token* start) {
124 bool continueB = true;
125 visitAstNodes(start, [&](Token* tok) {
126 const Token* parent = tok->astParent();
127 while (Token::simpleMatch(parent, ":"))
128 parent = parent->astParent();
129 if (isUnevaluated(tok) || isDeadCode(tok, parent))
130 return ChildrenToVisit::none;
131 continueB &= update(tok);
132 if (continueB)
133 return ChildrenToVisit::op1_and_op2;
134 return ChildrenToVisit::done;
135 });
136 return continueB;
137 }
138
139 Analyzer::Action analyzeRecursive(const Token* start) const {
140 Analyzer::Action result = Analyzer::Action::None;

Callers 1

valueFlowGenericForwardFunction · 0.80

Calls 5

visitAstNodesFunction · 0.85
isUnevaluatedFunction · 0.85
astParentMethod · 0.80
simpleMatchFunction · 0.70
updateFunction · 0.70

Tested by

no test coverage detected