[clang-tools-extra] r374163 - [clangd] Propagate context into reply handlers

Kadir Cetinkaya via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 9 05:48:41 PDT 2019


Author: kadircet
Date: Wed Oct  9 05:48:41 2019
New Revision: 374163

URL: http://llvm.org/viewvc/llvm-project?rev=374163&view=rev
Log:
[clangd] Propagate context into reply handlers

Modified:
    clang-tools-extra/trunk/clangd/ClangdLSPServer.h

Modified: clang-tools-extra/trunk/clangd/ClangdLSPServer.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdLSPServer.h?rev=374163&r1=374162&r2=374163&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdLSPServer.h (original)
+++ clang-tools-extra/trunk/clangd/ClangdLSPServer.h Wed Oct  9 05:48:41 2019
@@ -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) {




More information about the cfe-commits mailing list