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

Function getFuncTokFromThis

lib/checkclass.cpp:2313–2320  ·  view source on GitHub ↗

tok should point at "this"

Source from the content-addressed store, hash-verified

2311
2312// tok should point at "this"
2313static const Token* getFuncTokFromThis(const Token* tok) {
2314 if (!Token::simpleMatch(tok->next(), "."))
2315 return nullptr;
2316 tok = tok->tokAt(2);
2317 while (Token::Match(tok, "%name% ::"))
2318 tok = tok->tokAt(2);
2319 return Token::Match(tok, "%name% (") ? tok : nullptr;
2320}
2321
2322bool CheckClassImpl::isMemberVar(const Scope *scope, const Token *tok) const
2323{

Callers 2

isMemberVarMethod · 0.85
checkConstFuncMethod · 0.85

Calls 3

nextMethod · 0.80
simpleMatchFunction · 0.70
tokAtMethod · 0.45

Tested by

no test coverage detected