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

Function memberFunctionEnd

lib/tokenize.cpp:2858–2871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2856 }
2857
2858 const Token * memberFunctionEnd(const Token *tok)
2859 {
2860 if (tok->str() != "(")
2861 return nullptr;
2862 const Token *end = tok->link()->next();
2863 while (end) {
2864 if (end->str() == "{" && !Token::Match(end->tokAt(-2), ":|, %name%"))
2865 return end;
2866 if (end->str() == ";")
2867 break;
2868 end = end->next();
2869 }
2870 return nullptr;
2871 }
2872} // namespace
2873
2874bool Tokenizer::isMemberFunction(const Token *openParen)

Callers 1

simplifyUsingMethod · 0.85

Calls 3

nextMethod · 0.80
strMethod · 0.45
tokAtMethod · 0.45

Tested by

no test coverage detected