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

Function astFunctionYield

lib/astutils.cpp:323–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323Library::Container::Yield astFunctionYield(const Token* tok, const Library& library, const Token** ftok)
324{
325 if (!tok)
326 return Library::Container::Yield::NO_YIELD;
327
328 const auto* function = library.getFunction(tok);
329 if (!function)
330 return Library::Container::Yield::NO_YIELD;
331
332 if (ftok)
333 *ftok = tok;
334 return function->containerYield;
335}
336
337bool astIsRangeBasedForDecl(const Token* tok)
338{

Callers 3

valueFlowLifetimeFunction · 0.85
findIteratorYieldFunction · 0.85

Calls 1

getFunctionMethod · 0.45

Tested by

no test coverage detected