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

Function skipScopeIdentifiers

lib/symboldatabase.cpp:97–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97static const Token* skipScopeIdentifiers(const Token* tok)
98{
99 if (Token::Match(tok, ":: %name%"))
100 tok = tok->next();
101 while (Token::Match(tok, "%name% ::") ||
102 (Token::Match(tok, "%name% <") && Token::Match(tok->linkAt(1), ">|>> ::"))) {
103 if (tok->strAt(1) == "::")
104 tok = tok->tokAt(2);
105 else
106 tok = tok->linkAt(1)->tokAt(2);
107 }
108
109 return tok;
110}
111
112static bool isExecutableScope(const Token* tok)
113{

Callers 3

isUnknownTypeFunction · 0.85
ScopeMethod · 0.85
isVariableDeclarationMethod · 0.85

Calls 3

nextMethod · 0.80
linkAtMethod · 0.80
tokAtMethod · 0.45

Tested by

no test coverage detected