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

Function hasToken

lib/astutils.cpp:517–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517static bool hasToken(const Token * startTok, const Token * stopTok, const Token * tok)
518{
519 for (const Token * tok2 = startTok; tok2 != stopTok; tok2 = tok2->next()) {
520 if (tok2 == tok)
521 return true;
522 }
523 return false;
524}
525
526template<class T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
527static T* previousBeforeAstLeftmostLeafGeneric(T* tok)

Callers 1

Calls 1

nextMethod · 0.80

Tested by

no test coverage detected