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

Function getFunctionToken

lib/templatesimplifier.cpp:728–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

726}
727
728static const Token* getFunctionToken(const Token* nameToken)
729{
730 if (Token::Match(nameToken, "%name% ("))
731 return nameToken->next();
732
733 if (Token::Match(nameToken, "%name% <")) {
734 const Token* end = nameToken->next()->findClosingBracket();
735 if (Token::simpleMatch(end, "> ("))
736 return end->next();
737 }
738
739 return nullptr;
740}
741
742static void getFunctionArguments(const Token* nameToken, std::vector<const Token*>& args)
743{

Callers 2

getFunctionArgumentsFunction · 0.85
isConstMethodFunction · 0.85

Calls 3

nextMethod · 0.80
simpleMatchFunction · 0.70
findClosingBracketMethod · 0.45

Tested by

no test coverage detected