hokein added inline comments.
================ Comment at: clang-tools-extra/clangd/FindTarget.cpp:584 + void VisitRedeclarableTemplateDecl(const RedeclarableTemplateDecl *TD) { + // {Class,Function,Var,TypeAlias}TemplateDecls are visited as part of the + // NamedDecl below, we skip them here to not visit them twice. ---------------- the code this is correct right now (since {Class,Function,Var,TypeAlias}TemplateDecls are the decls that derive from `RedeclarableTemplateDecl`), but I would do this in another way -- just add a filter in the VisitNamedDecl below, like ``` void VisitNamedDecl(const NamedDecl *ND) { ... if (ND is one of the {Class,Function,Var,TypeAlias}TemplateDecls) return; } ``` ================ Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:744 "1: targets = {foo::Bar}, decl\n" - "2: targets = {foo::Bar}, decl\n" - "3: targets = {foo::Bar}\n" ---------------- nit: the diff seems not to be the one I have submitted, there should be a FIXME here which should be removed in this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73101/new/ https://reviews.llvm.org/D73101 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits