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

Function isDerivedFromItself

lib/symboldatabase.cpp:4879–4887  ·  view source on GitHub ↗

prevent recursion if base is the same except for different template parameters

Source from the content-addressed store, hash-verified

4877
4878// prevent recursion if base is the same except for different template parameters
4879static bool isDerivedFromItself(const std::string& thisName, const std::string& baseName)
4880{
4881 if (thisName.back() != '>')
4882 return false;
4883 const auto pos = thisName.find('<');
4884 if (pos == std::string::npos)
4885 return false;
4886 return thisName.compare(0, pos + 1, baseName, 0, pos + 1) == 0;
4887}
4888
4889const Function * Function::getOverriddenFunctionRecursive(const ::Type* baseType, bool *foundAllBaseClasses) const
4890{

Callers 1

Calls 2

findMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected