diff options
Diffstat (limited to 'lib/AST/CXXInheritance.cpp')
-rw-r--r-- | lib/AST/CXXInheritance.cpp | 6 |
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; |