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

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 19 03:04:44 PST 2019


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:687
 
-  const Decl *D = Decls[0];
+  const Decl *D = nullptr;
+  for (const Decl *Candidate : Decls) {
----------------
kadircet wrote:
> maybe just
> ```
> const Decl *D = Decls.front()
> for(const auto *C : Decls) {
>   if(isa<ClassTempl...>(C)) {
>     D = C;
>     break;
>   }
> }
> ```
now you can use `explicitReferenceTargets` instead, with only `DeclRelation::Underlying` set in the mask.


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