[all-commits] [llvm/llvm-project] 1af0e3: [clangd][c++20] Drop first template argument in co...
jensmassberg via All-commits
all-commits at lists.llvm.org
Wed Jul 5 03:07:47 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1af0e34477a3b4a28a1c251e527c9f75f5cf69e1
https://github.com/llvm/llvm-project/commit/1af0e34477a3b4a28a1c251e527c9f75f5cf69e1
Author: Jens Massberg <massberg at google.com>
Date: 2023-07-05 (Wed, 05 Jul 2023)
Changed paths:
M clang-tools-extra/clangd/CodeComplete.cpp
M clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
Log Message:
-----------
[clangd][c++20] Drop first template argument in code completion in some contexts.
In case of a top level context the first template argument of a concept
should be dropped. Currently the indexer doesn't support different
signatures for different contexts (for an index entry always the default
`Symbol` context is used). Thus we add a hack which checks if we are in
a top level context and have a concept and in that case removes the
first argment of the signature and snippet suffix. If there is only a
single argument, the signature and snippet suffix are completly
removed. The check for the first argument is done by simply looking for
the first comma which should be sufficient in most cases.
Additionally extend test environment to support adding artificial index
entries with signature and completion snippet suffix.
Differential Revision: https://reviews.llvm.org/D154450
More information about the All-commits
mailing list