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

Method isNotLibraryFunction

lib/library.cpp:1499–1512  ·  view source on GitHub ↗

returns true if ftok is not a library function

Source from the content-addressed store, hash-verified

1497
1498// returns true if ftok is not a library function
1499bool Library::isNotLibraryFunction(const Token *ftok, const Function **func) const
1500{
1501 if (ftok->isKeyword() || ftok->isStandardType())
1502 return true;
1503
1504 if (ftok->function() && ftok->function()->nestedIn && ftok->function()->nestedIn->type != ScopeType::eGlobal)
1505 return true;
1506
1507 // variables are not library functions.
1508 if (ftok->varId())
1509 return true;
1510
1511 return !matchArguments(ftok, getFunctionName(ftok), func);
1512}
1513
1514bool Library::matchArguments(const Token *ftok, const std::string &functionName, const Function **func) const
1515{

Callers 9

getCastTypeStartTokenFunction · 0.80
setTokenValueFunction · 0.80
simplifyAttributeMethod · 0.80
function_match_scopeMethod · 0.80
function_match_argsMethod · 0.80
function_match_varMethod · 0.80

Calls 3

isKeywordMethod · 0.45
isStandardTypeMethod · 0.45
functionMethod · 0.45

Tested by 4

function_match_scopeMethod · 0.64
function_match_argsMethod · 0.64
function_match_varMethod · 0.64