diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index cd650a981..f30f72137 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -806,6 +806,33 @@ void CheckClass::SpaceInfo::clearAllVar() //--------------------------------------------------------------------------- +bool CheckClass::SpaceInfo::isBaseClassFunc(const Token *tok) +{ + // Iterate through each base class... + for (unsigned int i = 0; i < derivedFrom.size(); ++i) + { + const SpaceInfo *info = derivedFrom[i].spaceInfo; + + // Check if base class exists in database + if (info) + { + std::list::const_iterator it; + + for (it = info->functionList.begin(); it != info->functionList.end(); ++it) + { + if (it->tokenDef->str() == tok->str()) + return true; + } + } + + // Base class not found so assume it is in it. + else + return true; + } + + return false; +} + void CheckClass::SpaceInfo::initializeVarList(const Func &func, std::list &callstack) { bool Assign = false; @@ -964,7 +991,7 @@ void CheckClass::SpaceInfo::initializeVarList(const Func &func, std::list