aboutsummaryrefslogtreecommitdiff
path: root/clangd/ClangdLSPServer.h
diff options
context:
space:
mode:
Diffstat (limited to 'clangd/ClangdLSPServer.h')
-rw-r--r--clangd/ClangdLSPServer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/clangd/ClangdLSPServer.h b/clangd/ClangdLSPServer.h
index 5664efd3..850da981 100644
--- a/clangd/ClangdLSPServer.h
+++ b/clangd/ClangdLSPServer.h
@@ -10,6 +10,7 @@
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDLSPSERVER_H
#include "ClangdServer.h"
+#include "Context.h"
#include "DraftStore.h"
#include "Features.inc"
#include "FindSymbols.h"
@@ -131,6 +132,11 @@ private:
void publishDiagnostics(const URIForFile &File,
std::vector<clangd::Diagnostic> Diagnostics);
+ // Since initialization of CDBs and ClangdServer is done lazily, the following
+ // context captures the one used while creating ClangdLSPServer and passes it
+ // to above mentioned object instances to make sure they share the same state.
+ Context BackgroundContext;
+
/// Used to indicate that the 'shutdown' request was received from the
/// Language Server client.
bool ShutdownRequestReceived = false;