[PATCH] D22955: [MSVC] Improved late parsing of template functions.
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 14 06:53:02 PDT 2016
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
More information about the cfe-commits
mailing list