[PATCH] D116352: [CodeCompletion] Signature help for template argument lists
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 3 05:42:28 PST 2022
sammccall updated this revision to Diff 397049.
sammccall added a comment.
Change ResultType handling for template functions. Given:
template <typename T> string getName(int count) const &
We return the signature:
{ResultType=string} getName<{placeholder=typename T}>()
Clangd renders this as:
getName<$(0:typename T)>() -> string
We drop the function parameter list because
- it's potentially long and distracts from the template args we're showing
- there's no convenient way to print it!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116352/new/
https://reviews.llvm.org/D116352
Files:
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/test/initialize-params.test
clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
clang/include/clang/Parse/Parser.h
clang/include/clang/Sema/CodeCompleteConsumer.h
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Parse/ParseTemplate.cpp
clang/lib/Sema/CodeCompleteConsumer.cpp
clang/lib/Sema/SemaCodeComplete.cpp
clang/test/CodeCompletion/template-signature.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116352.397049.patch
Type: text/x-patch
Size: 23486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220103/f809e890/attachment-0001.bin>
More information about the cfe-commits
mailing list