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

Function isNonMacro

lib/tokenize.cpp:8553–8564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8551}
8552
8553static bool isNonMacro(const Token* tok)
8554{
8555 if (tok->isKeyword() || tok->isStandardType())
8556 return true;
8557 if (cAlternativeTokens.count(tok->str()) > 0)
8558 return true;
8559 if (startsWith(tok->str(), "__")) // attribute/annotation
8560 return true;
8561 if (Token::simpleMatch(tok, "alignas ("))
8562 return true;
8563 return false;
8564}
8565
8566void Tokenizer::reportUnknownMacros() const
8567{

Callers 1

reportUnknownMacrosMethod · 0.85

Calls 5

startsWithFunction · 0.70
simpleMatchFunction · 0.70
isKeywordMethod · 0.45
isStandardTypeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected