diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-10-23 18:13:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-10-23 18:13:27 +0000 |
commit | 57c856b96e6bbfc64c2d61b950b116b523dc3e46 (patch) | |
tree | b1ddcdaebfdcab6a974e1d5b45096bcdcdc2c91c /lib/Sema/SemaInherit.cpp | |
parent | 4c877cc89bd7b29917002f370b97bc19b114459e (diff) |
Clean up and document the representation of C++ base classes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInherit.cpp')
-rw-r--r-- | lib/Sema/SemaInherit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaInherit.cpp b/lib/Sema/SemaInherit.cpp index 022c8043d0..6890dbfc64 100644 --- a/lib/Sema/SemaInherit.cpp +++ b/lib/Sema/SemaInherit.cpp @@ -39,8 +39,8 @@ bool Sema::IsDerivedFrom(QualType Derived, QualType Base) if (const RecordType *DerivedType = Derived->getAsRecordType()) { const CXXRecordDecl *Decl = static_cast<const CXXRecordDecl *>(DerivedType->getDecl()); - for (unsigned idx = 0; idx < Decl->getNumBases(); ++idx) { - const CXXBaseSpecifier *BaseSpec = Decl->getBase(idx); + for (CXXRecordDecl::base_class_const_iterator BaseSpec = Decl->bases_begin(); + BaseSpec != Decl->bases_end(); ++BaseSpec) { if (Context.getCanonicalType(BaseSpec->getType()) == Base || IsDerivedFrom(BaseSpec->getType(), Base)) return true; |