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

Function skipMethodDeclEnding

lib/tokenlist.cpp:1595–1605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1593}
1594
1595static Token *skipMethodDeclEnding(Token *tok)
1596{
1597 if (tok->str() != ")")
1598 tok = tok->previous();
1599 if (!tok || tok->str() != ")")
1600 return nullptr;
1601 Token *const tok2 = const_cast<Token*>(TokenList::isFunctionHead(tok, ";{"));
1602 if (tok2 && tok->next() != tok2)
1603 return tok2;
1604 return nullptr;
1605}
1606
1607/**
1608 * @throws InternalError thrown in case of syntax error

Callers 1

createAstAtTokenFunction · 0.85

Calls 2

nextMethod · 0.80
strMethod · 0.45

Tested by

no test coverage detected