[PATCH] D71090: [clangd] Navigation from definition of template specialization to primary template
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 7 21:42:28 PST 2019
nridge added inline comments.
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:240
+ // it's more useful to navigate to the template declaration.
+ if (Preferred->getLocation() == IdentStartLoc) {
+ if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(Preferred)) {
----------------
sammccall wrote:
> sammccall wrote:
> > Be aware that this is going to break "go to definition" toggling between def and decl. I think that's fine.
> (I think you probably want the macro-arg-expanded location here)
For what will this break toggling? Aas far as I'm aware, partial and explicit specializations of templates do not have separate declarations.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71090/new/
https://reviews.llvm.org/D71090
More information about the cfe-commits
mailing list