ABataev added inline comments.

================
Comment at: lib/Sema/SemaLookup.cpp:1044-1070
+static bool isBaseClass(const CXXRecordDecl *Record, CXXRecordDecl *Base) {
+  SmallVector<const CXXRecordDecl *, 8> Queue;
+
+  while (true) {
+    for (const auto &I : Record->bases()) {
+      const RecordType *Ty = I.getType()->getAs<RecordType>();
+      if (!Ty)
----------------
majnemer wrote:
> This looks a lot like forallBases, any chance it could be reused?
Yes, they are very similar, but forallBases() is a bit different. It checks 
that the provided callback returns true for all bases. In this case I need a 
single match, while other bases may not match. That's why I can't reuse 
forallBases().


https://reviews.llvm.org/D22955



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to