[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 16 00:33:07 PST 2019


kadircet added a reviewer: kadircet.
kadircet added a comment.

I think this requires changes in other places too, for example when querying index for the children we rather want to query using the symbolid of template pattern, not the instantiation.



================
Comment at: clang-tools-extra/clangd/XRefs.cpp:682
   DeclRelationSet Relations =
-      DeclRelation::TemplatePattern | DeclRelation::Underlying;
+      DeclRelation::TemplateInstantiation | DeclRelation::Underlying;
   auto Decls = getDeclAtPosition(AST, SourceLocationBeg, Relations);
----------------
instead of doing the traversal twice, can we just sent both pattern and instantiation here, and then prefer the `specializationdecl` instead of just selecting `decls[0]` below ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71533/new/

https://reviews.llvm.org/D71533





More information about the cfe-commits mailing list