[PATCH] D120131: [clangd] prototype: for singly-instantiated templates, examine the instantiation
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 18 07:06:56 PST 2022
sammccall created this revision.
Herald added subscribers: usaxena95, kadircet, arphaman.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added projects: clang, clang-tools-extra.
This prototype is crude and breaks things (e.g. including rename).
It has this behavior for all selections and nothing else.
A real version would use it for *some* selections (not rename!) and some other
traversals too (syntax highlighting).
It does allow hover/go-to-definition to work in cases like:
void callMeWithFoos(std::function<void(Foo)>);
...
callMeWithFoos([](auto &&x) {
x.^bar(); // will jump to Foo::bar
});
as well as other cases handled in D119537 <https://reviews.llvm.org/D119537>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D120131
Files:
clang-tools-extra/clangd/FindTarget.cpp
clang-tools-extra/clangd/Selection.cpp
clang/include/clang/AST/RecursiveASTVisitor.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120131.409926.patch
Type: text/x-patch
Size: 7647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220218/92995669/attachment-0001.bin>
More information about the cfe-commits
mailing list