| 5866 | } |
| 5867 | |
| 5868 | const Scope *Scope::findRecordInBase(const std::string & name) const |
| 5869 | { |
| 5870 | if (isClassOrStruct() && definedType && !definedType->derivedFrom.empty()) { |
| 5871 | const std::vector<Type::BaseInfo> &derivedFrom = definedType->derivedFrom; |
| 5872 | for (const Type::BaseInfo & i : derivedFrom) { |
| 5873 | const Type *base = i.type; |
| 5874 | if (base && base->classScope) { |
| 5875 | if (base->classScope == this) // Recursive class; tok should have been found already |
| 5876 | continue; |
| 5877 | |
| 5878 | if (base->name() == name) { |
| 5879 | return base->classScope; |
| 5880 | } |
| 5881 | |
| 5882 | const ::Type * t = base->classScope->findType(name); |
| 5883 | if (t) |
| 5884 | return t->classScope; |
| 5885 | } |
| 5886 | } |
| 5887 | } |
| 5888 | |
| 5889 | return nullptr; |
| 5890 | } |
| 5891 | |
| 5892 | std::vector<const Scope*> Scope::findAssociatedScopes() const |
| 5893 | { |
no test coverage detected