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

Function isType

lib/checkother.cpp:2182–2195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2180//---------------------------------------------------------------------------
2181
2182static bool isType(const Token * tok, bool unknown)
2183{
2184 if (tok && (tok->isStandardType() || (!tok->isKeyword() && Token::Match(tok, "%type%")) || tok->str() == "auto"))
2185 return true;
2186 if (tok && tok->varId())
2187 return false;
2188 if (Token::simpleMatch(tok, "::"))
2189 return isType(tok->astOperand2(), unknown);
2190 if (Token::simpleMatch(tok, "<") && tok->link())
2191 return true;
2192 if (unknown && Token::Match(tok, "%name% !!("))
2193 return true;
2194 return false;
2195}
2196
2197static bool isVarDeclOp(const Token* tok)
2198{

Callers 1

isVarDeclOpFunction · 0.85

Calls 5

astOperand2Method · 0.80
simpleMatchFunction · 0.70
isStandardTypeMethod · 0.45
isKeywordMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected