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
diff --git a/lib/AST/InheritViz.cpp b/lib/AST/InheritViz.cpp
index b817ed6..bfd859f 100644
--- a/lib/AST/InheritViz.cpp
+++ b/lib/AST/InheritViz.cpp
@@ -92,8 +92,8 @@
// Display the base classes.
const CXXRecordDecl *Decl
= static_cast<const CXXRecordDecl *>(Type->getAsRecordType()->getDecl());
- for (unsigned idx = 0; idx < Decl->getNumBases(); ++idx) {
- const CXXBaseSpecifier *Base = Decl->getBase(idx);
+ for (CXXRecordDecl::base_class_const_iterator Base = Decl->bases_begin();
+ Base != Decl->bases_end(); ++Base) {
QualType CanonBaseType = Context.getCanonicalType(Base->getType());
// If this is not virtual inheritance, bump the direct base