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

Method forwardRecursive

lib/pathanalysis.cpp:70–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70PathAnalysis::Progress PathAnalysis::forwardRecursive(const Token* tok, Info info, const std::function<PathAnalysis::Progress(const Info&)>& f)
71{
72 if (!tok)
73 return Progress::Continue;
74 if (tok->astOperand1() && forwardRecursive(tok->astOperand1(), info, f) == Progress::Break)
75 return Progress::Break;
76 info.tok = tok;
77 if (f(info) == Progress::Break)
78 return Progress::Break;
79 if (tok->astOperand2() && forwardRecursive(tok->astOperand2(), std::move(info), f) == Progress::Break)
80 return Progress::Break;
81 return Progress::Continue;
82}
83
84PathAnalysis::Progress PathAnalysis::forwardRange(const Token* startToken, const Token* endToken, Info info, const std::function<PathAnalysis::Progress(const Info&)>& f) const
85{

Callers

nothing calls this directly

Calls 3

astOperand1Method · 0.80
astOperand2Method · 0.80
fFunction · 0.50

Tested by

no test coverage detected