aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/CXXInheritance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/CXXInheritance.cpp')
-rw-r--r--clang/lib/AST/CXXInheritance.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/clang/lib/AST/CXXInheritance.cpp b/clang/lib/AST/CXXInheritance.cpp
index d1a2b43..6a6ca76 100644
--- a/clang/lib/AST/CXXInheritance.cpp
+++ b/clang/lib/AST/CXXInheritance.cpp
@@ -137,7 +137,6 @@ CXXRecordDecl::isCurrentInstantiation(const DeclContext *CurContext) const {
bool CXXRecordDecl::forallBases(ForallBasesCallback BaseMatches,
bool AllowShortCircuit) const {
SmallVector<const CXXRecordDecl*, 8> Queue;
- llvm::SmallPtrSet<const CXXRecordDecl*, 8> Enqueued;
const CXXRecordDecl *Record = this;
bool AllMatches = true;
@@ -159,14 +158,12 @@ bool CXXRecordDecl::forallBases(ForallBasesCallback BaseMatches,
AllMatches = false;
continue;
}
-
- if (Enqueued.insert(Base).second) {
- Queue.push_back(Base);
- if (!BaseMatches(Base)) {
- if (AllowShortCircuit) return false;
- AllMatches = false;
- continue;
- }
+
+ Queue.push_back(Base);
+ if (!BaseMatches(Base)) {
+ if (AllowShortCircuit) return false;
+ AllMatches = false;
+ continue;
}
}