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

Method isFunctionConst

lib/library.cpp:1767–1773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1765 return false;
1766}
1767bool Library::isFunctionConst(const std::string& functionName, bool pure) const
1768{
1769 const auto it = utils::as_const(mData->mFunctions).find(functionName);
1770 if (it != mData->mFunctions.cend())
1771 return pure ? it->second.ispure : it->second.isconst;
1772 return false;
1773}
1774bool Library::isFunctionConst(const Token *ftok) const
1775{
1776 if (ftok->function() && ftok->function()->isConst())

Callers 9

checkFileUsageMethod · 0.80
isNonConstFunctionCallFunction · 0.80
isSimpleExprFunction · 0.80
checkConstPointerMethod · 0.80
checkInvalidFreeMethod · 0.80
simplifyAttributeMethod · 0.80
checkConstFuncMethod · 0.80
isSameExpressionFunction · 0.80
isVariableChangedFunction · 0.80

Calls 7

astContainerYieldFunction · 0.85
isConstMethod · 0.80
astParentMethod · 0.80
astOperand1Method · 0.80
simpleMatchFunction · 0.70
findMethod · 0.45
functionMethod · 0.45

Tested by

no test coverage detected