aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/CXXInheritance.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-09 04:26:02 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-09 04:26:02 +0000
commitca910e84ea026a898c7184d3f3608403005b9bc0 (patch)
treee9a56afd059a630dcdc8182aa8f8066ccb3de0b7 /lib/AST/CXXInheritance.cpp
parentbcb02fc690a2f9a6991b440181f70a0875e5c965 (diff)
In CXXRecordDecl::forallBases, add the base to the "queue", so we walk more than one heirarchy of classes. John, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CXXInheritance.cpp')
-rw-r--r--lib/AST/CXXInheritance.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/CXXInheritance.cpp b/lib/AST/CXXInheritance.cpp
index e5300f8284..92a58b76d8 100644
--- a/lib/AST/CXXInheritance.cpp
+++ b/lib/AST/CXXInheritance.cpp
@@ -117,14 +117,16 @@ bool CXXRecordDecl::forallBases(ForallBasesCallback *BaseMatches,
continue;
}
- RecordDecl *Base = Ty->getDecl()->getDefinition(Context);
+ CXXRecordDecl *Base =
+ cast_or_null<CXXRecordDecl>(Ty->getDecl()->getDefinition(Context));
if (!Base) {
if (AllowShortCircuit) return false;
AllMatches = false;
continue;
}
- if (!BaseMatches(cast<CXXRecordDecl>(Base), OpaqueData)) {
+ Queue.push_back(Base);
+ if (!BaseMatches(Base, OpaqueData)) {
if (AllowShortCircuit) return false;
AllMatches = false;
continue;