diff options
| author | Sam McCall <sam.mccall@gmail.com> | 2019-07-08 17:27:15 +0000 |
|---|---|---|
| committer | Sam McCall <sam.mccall@gmail.com> | 2019-07-08 17:27:15 +0000 |
| commit | 5f092e31ab8554dfba429fb43ec2a632bb7e3b1d (patch) | |
| tree | 0d8d10acd8b4bbe218a12811bb884addc01266fd /clang-tools-extra/clangd/tool/ClangdMain.cpp | |
| parent | b736969eddce563a7fd3fe10b8fe7adfd85c8692 (diff) | |
| download | bcm5719-llvm-5f092e31ab8554dfba429fb43ec2a632bb7e3b1d.tar.gz bcm5719-llvm-5f092e31ab8554dfba429fb43ec2a632bb7e3b1d.zip | |
[clangd] Use -completion-style=bundled by default if signature help is available
Summary:
I didn't manage to find something nicer than optional<bool>, but at least I
found a sneakier comment.
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64216
llvm-svn: 365356
Diffstat (limited to 'clang-tools-extra/clangd/tool/ClangdMain.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/tool/ClangdMain.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp index d509f53fce3..a0d95b4c6bd 100644 --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -58,8 +58,7 @@ static llvm::cl::opt<CompletionStyleFlag> CompletionStyle( "completion, with full type information"), clEnumValN(Bundled, "bundled", "Similar completion items (e.g. function overloads) are " - "combined. Type information shown where possible")), - llvm::cl::init(Detailed)); + "combined. Type information shown where possible"))); // FIXME: Flags are the wrong mechanism for user preferences. // We should probably read a dotfile or similar. @@ -487,7 +486,8 @@ int main(int argc, char *argv[]) { clangd::CodeCompleteOptions CCOpts; CCOpts.IncludeIneligibleResults = IncludeIneligibleResults; CCOpts.Limit = LimitResults; - CCOpts.BundleOverloads = CompletionStyle != Detailed; + if (CompletionStyle.getNumOccurrences()) + CCOpts.BundleOverloads = CompletionStyle != Detailed; CCOpts.ShowOrigins = ShowOrigins; CCOpts.InsertIncludes = HeaderInsertion; if (!HeaderInsertionDecorators) { |

