| 706 | } |
| 707 | |
| 708 | static void getAllVariableMembers(const Scope *scope, std::vector<const Variable *>& varList) |
| 709 | { |
| 710 | std::transform(scope->varlist.cbegin(), scope->varlist.cend(), std::back_inserter(varList), [](const Variable& var) { |
| 711 | return &var; |
| 712 | }); |
| 713 | if (scope->definedType) { |
| 714 | for (const Type::BaseInfo& baseInfo: scope->definedType->derivedFrom) { |
| 715 | if (scope->definedType == baseInfo.type) |
| 716 | continue; |
| 717 | const Scope *baseClass = baseInfo.type ? baseInfo.type->classScope : nullptr; |
| 718 | if (baseClass && baseClass->isClassOrStruct() && baseClass->numConstructors == 0) |
| 719 | getAllVariableMembers(baseClass, varList); |
| 720 | } |
| 721 | } |
| 722 | } |
| 723 | |
| 724 | std::vector<CheckClassImpl::Usage> CheckClassImpl::createUsageList(const Scope *scope) |
| 725 | { |