[PATCH] D69237: Refactor getDeclAtPosition() to use SelectionTree + targetDecl()

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 14:34:17 PDT 2019


nridge added inline comments.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:1133
+  DeclRelationSet Relations =
+      DeclRelation::TemplatePattern | DeclRelation::Alias;
+  auto Decls = getDeclAtPosition(AST, SourceLocationBeg, Relations);
----------------
sammccall wrote:
> Are you sure you don't want type hierarchy to work on aliases to record types? (i.e. specify underlying rather than alias)
Good catch! I added a test case to `TypeHierarchyTests` for this as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69237





More information about the cfe-commits mailing list