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

Function findEnumScopeInBase

lib/symboldatabase.cpp:5487–5500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5485}
5486
5487static const Scope* findEnumScopeInBase(const Scope* scope, const std::string& tokStr)
5488{
5489 if (scope->definedType) {
5490 const std::vector<Type::BaseInfo>& derivedFrom = scope->definedType->derivedFrom;
5491 for (const Type::BaseInfo& i : derivedFrom) {
5492 const Type *derivedFromType = i.type;
5493 if (derivedFromType && derivedFromType->classScope) {
5494 if (const Scope* enumScope = derivedFromType->classScope->findRecordInNestedList(tokStr))
5495 return enumScope;
5496 }
5497 }
5498 }
5499 return nullptr;
5500}
5501
5502static const Enumerator* findEnumeratorInUsingList(const Scope* scope, const std::string& name)
5503{

Callers 1

findEnumeratorMethod · 0.85

Calls 1

Tested by

no test coverage detected