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

Function nextArgumentImpl

lib/token.cpp:814–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

812}
813
814template<class T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
815static T* nextArgumentImpl(T *thisTok)
816{
817 for (T* tok = thisTok; tok; tok = tok->next()) {
818 if (tok->str() == ",")
819 return tok->next();
820 if (tok->link() && Token::Match(tok, "(|{|[|<"))
821 tok = tok->link();
822 else if (Token::Match(tok, ")|;"))
823 return nullptr;
824 }
825 return nullptr;
826}
827
828const Token* Token::nextArgument() const
829{

Callers 1

nextArgumentMethod · 0.85

Calls 2

nextMethod · 0.80
strMethod · 0.45

Tested by

no test coverage detected