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

Function findIteratorYield

lib/valueflow.cpp:6363–6374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6361}
6362
6363static Library::Container::Yield findIteratorYield(Token* tok, const Token*& ftok, const Library& library)
6364{
6365 auto yield = astContainerYield(tok, library, &ftok);
6366 if (ftok)
6367 return yield;
6368
6369 if (!tok->astParent())
6370 return yield;
6371
6372 // begin/end free functions
6373 return astFunctionYield(tok->astParent()->previous(), library, &ftok);
6374}
6375
6376static void valueFlowIterators(TokenList& tokenlist, const Settings& settings)
6377{

Callers 1

valueFlowIteratorsFunction · 0.85

Calls 3

astContainerYieldFunction · 0.85
astFunctionYieldFunction · 0.85
astParentMethod · 0.80

Tested by

no test coverage detected