hokein added inline comments.
================ Comment at: clang/lib/Index/IndexTypeSourceInfo.cpp:167 + if (!TraverseTemplateName(TL.getTypePtr()->getTemplateName())) + return false; + ---------------- nridge wrote: > hokein wrote: > > nit: this could be simplified by calling the > > `base::TraverseTemplateSpecializationTypeLoc` > I don't see how, given that `WalkUpFromTemplateSpecializationTypeLoc()`needs > to be called with `Relations` containing `RelationIsBaseOf`, while > `TraverseTemplateArgumentLoc()` needs to be called with `Relations` empty. you're right. I misthought the above 4 lines are exactly the same as the one in RAV. ================ Comment at: clang/lib/Index/IndexTypeSourceInfo.cpp:174 + for (unsigned I = 0, E = TL.getNumArgs(); I != E; ++I) { + if (!TraverseTemplateArgumentLoc(TL.getArgLoc(I))) + return false; ---------------- if something bad happens (TraverseTemplateArgumentLoc returns false), we will not restore the Relations, I think we need a RAII pattern (`llvm::make_scope_exit`) to restore the `Relations`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86424/new/ https://reviews.llvm.org/D86424 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits