summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/CodeComplete.h
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-06-15 11:06:29 +0000
committerSam McCall <sam.mccall@gmail.com>2018-06-15 11:06:29 +0000
commitc18c280d23ecabd6554a8c55bd8c760709671bbc (patch)
tree18122860ce0af58870fcd5486e6a12cd3fe74c99 /clang-tools-extra/clangd/CodeComplete.h
parent180497ea11778ffcd3cd1684ccf5c2405beda486 (diff)
downloadbcm5719-llvm-c18c280d23ecabd6554a8c55bd8c760709671bbc.tar.gz
bcm5719-llvm-c18c280d23ecabd6554a8c55bd8c760709671bbc.zip
[clangd] Add option to fold overloads into a single completion item.
Summary: Adds a CodeCompleteOption to folds together compatible function/method overloads into a single item. This feels pretty good (for editors with signatureHelp support), but has limitations. This happens in the code completion merge step, so there may be inconsistencies (e.g. if only one overload made it into the index result list, no folding). We don't want to bundle together completions that have different side-effects (include insertion), because we can't constructo a coherent CompletionItem. This may be confusing for users, as the reason for non-bundling may not be immediately obvious. (Also, the implementation seems a little fragile) Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47957 llvm-svn: 334822
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.h')
-rw-r--r--clang-tools-extra/clangd/CodeComplete.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.h b/clang-tools-extra/clangd/CodeComplete.h
index 1d29c31d865..4fb19cb1073 100644
--- a/clang-tools-extra/clangd/CodeComplete.h
+++ b/clang-tools-extra/clangd/CodeComplete.h
@@ -53,6 +53,9 @@ struct CodeCompleteOptions {
/// For example, private members are usually inaccessible.
bool IncludeIneligibleResults = false;
+ /// Combine overloads into a single completion item where possible.
+ bool BundleOverloads = false;
+
/// Limit the number of results returned (0 means no limit).
/// If more results are available, we set CompletionList.isIncomplete.
size_t Limit = 0;
OpenPOWER on IntegriCloud