[clangd] Propagate context into reply handlers
authorKadir Cetinkaya <kadircet@google.com>
Wed, 9 Oct 2019 12:48:41 +0000 (12:48 +0000)
committerKadir Cetinkaya <kadircet@google.com>
Wed, 9 Oct 2019 12:48:41 +0000 (12:48 +0000)
llvm-svn: 374163

clang-tools-extra/clangd/ClangdLSPServer.h

index 3f9f1cc..5664efd 100644 (file)
@@ -157,7 +157,7 @@ private:
   void call(StringRef Method, llvm::json::Value Params, Callback<Response> CB) {
     // Wrap the callback with LSP conversion and error-handling.
     auto HandleReply =
-        [CB = std::move(CB)](
+        [CB = std::move(CB), Ctx = Context::current().clone()](
             llvm::Expected<llvm::json::Value> RawResponse) mutable {
           Response Rsp;
           if (!RawResponse) {