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

Method getOverloadedFunctions

lib/symboldatabase.cpp:4846–4867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4844}
4845
4846std::vector<const Function*> Function::getOverloadedFunctions() const
4847{
4848 std::vector<const Function*> result;
4849 const Scope* scope = nestedIn;
4850
4851 while (scope) {
4852 const bool isMemberFunction = scope->isClassOrStruct() && !isStatic();
4853 for (auto it = scope->functionMap.find(tokenDef->str());
4854 it != scope->functionMap.end() && it->first == tokenDef->str();
4855 ++it) {
4856 const Function* func = it->second;
4857 if (isMemberFunction && isMemberFunction == func->isStatic())
4858 continue;
4859 result.push_back(func);
4860 }
4861 if (isMemberFunction)
4862 break;
4863 scope = scope->nestedIn;
4864 }
4865
4866 return result;
4867}
4868
4869const Function *Function::getOverriddenFunction(bool *foundAllBaseClasses) const
4870{

Callers 3

checkConstPointerMethod · 0.80
checkConstMethod · 0.80
isConstFunctionCallFunction · 0.80

Calls 5

isStaticFunction · 0.85
findMethod · 0.45
strMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected