diff options
| author | Sam McCall <sam.mccall@gmail.com> | 2018-03-05 17:28:54 +0000 |
|---|---|---|
| committer | Sam McCall <sam.mccall@gmail.com> | 2018-03-05 17:28:54 +0000 |
| commit | 7363a2f270e38179b259921800e99c018d15717c (patch) | |
| tree | 6b12091bb8f56df894d4e6cf7a39c8ef2656dbff /clang-tools-extra/clangd/ClangdLSPServer.cpp | |
| parent | cd855f70c5230a79d0b91cbbf6fb959572e67c50 (diff) | |
| download | bcm5719-llvm-7363a2f270e38179b259921800e99c018d15717c.tar.gz bcm5719-llvm-7363a2f270e38179b259921800e99c018d15717c.zip | |
[clangd] Extract ClangdServer::Options struct.
Summary:
This subsumes most of the params to ClangdServer and ClangdLSPServer.
Adjacent changes:
- tests use a consistent set of options, except when testing specific options
- tests that previously used synchronous mode for convenience no longer do
- added a runAddDocument helper to SyncAPIs to mitigate the extra code
- rearranged main a bit to follow the structure of the options
Reviewers: ilya-biryukov
Subscribers: klimek, jkorous-apple, ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D44088
llvm-svn: 326719
Diffstat (limited to 'clang-tools-extra/clangd/ClangdLSPServer.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/ClangdLSPServer.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index 6e232050ff7..539ee17acf4 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -395,17 +395,12 @@ void ClangdLSPServer::onChangeConfiguration( } } -ClangdLSPServer::ClangdLSPServer(JSONOutput &Out, unsigned AsyncThreadsCount, - bool StorePreamblesInMemory, +ClangdLSPServer::ClangdLSPServer(JSONOutput &Out, const clangd::CodeCompleteOptions &CCOpts, - llvm::Optional<StringRef> ResourceDir, llvm::Optional<Path> CompileCommandsDir, - bool BuildDynamicSymbolIndex, - SymbolIndex *StaticIdx) + const ClangdServer::Options &Opts) : Out(Out), CDB(std::move(CompileCommandsDir)), CCOpts(CCOpts), - Server(CDB, /*DiagConsumer=*/*this, FSProvider, AsyncThreadsCount, - StorePreamblesInMemory, BuildDynamicSymbolIndex, StaticIdx, - ResourceDir, /*UpdateDebounce=*/std::chrono::milliseconds(500)) {} + Server(CDB, FSProvider, /*DiagConsumer=*/*this, Opts) {} bool ClangdLSPServer::run(std::istream &In, JSONStreamStyle InputStyle) { assert(!IsDone && "Run was called before"); |

