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

Function reaches

lib/pathanalysis.cpp:185–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185bool reaches(const Token * start, const Token * dest, ErrorPath* errorPath)
186{
187 PathAnalysis::Info info = PathAnalysis{start}.forwardFind([&](const PathAnalysis::Info& i) {
188 return (i.tok == dest);
189 });
190 if (!info.tok)
191 return false;
192 if (errorPath)
193 errorPath->insert(errorPath->end(), info.errorPath.cbegin(), info.errorPath.cend());
194 return true;
195}

Callers 1

invalidContainerMethod · 0.85

Calls 2

forwardFindMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected