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

Function isEscapeFunction

lib/astutils.cpp:2233–2248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2231}
2232
2233bool isEscapeFunction(const Token* ftok, const Library& library)
2234{
2235 if (!Token::Match(ftok, "%name% ("))
2236 return false;
2237 const Function* function = ftok->function();
2238 if (function) {
2239 if (function->isEscapeFunction())
2240 return true;
2241 if (function->isAttributeNoreturn())
2242 return true;
2243 } else {
2244 if (library.isnoreturn(ftok))
2245 return true;
2246 }
2247 return false;
2248}
2249
2250static bool hasNoreturnFunction(const Token* tok, const Library& library, const Token** unknownFunc)
2251{

Callers 2

traverseTokFunction · 0.70
findEscapeStatementFunction · 0.70

Calls 2

isnoreturnMethod · 0.80
functionMethod · 0.45

Tested by

no test coverage detected