rsmith added inline comments.
================ Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:1281 + "Base class that isn't a record?"); + ToVisit.push_back(Base.getType()->getAs<RecordType>()); + } ---------------- erichkeane wrote: > rsmith wrote: > > It would be better to add the class to `Visited` here rather than in the > > loop below -- that is, only add each class to `ToVisit` once rather than > > only processing each class once. That would put a tighter upper bound on > > the size of `ToVisit`. > I'm perhaps missing something here... Can you clarify your suggestion a bit > more? If we add it to 'Visited' here, it will never get visited in the > while-loop below, right? The idea would be to remove the `Visited` check in the loops below. We would guarantee that each class is only visited once by only adding it to `ToVisit` once. (As an example, we do the same thing for `Queue` and `Visited` here: https://github.com/llvm/llvm-project/blob/master/clang/lib/Sema/SemaLookup.cpp#L1992) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84048/new/ https://reviews.llvm.org/D84048 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits