-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clangd][c++20] Drop first template argument in code completion in so…
…me 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
- Loading branch information
1 parent
7208fde
commit 1af0e34
Showing
2 changed files
with
68 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters