diff --git a/clang-tools-extra/clangd/JSONRPCDispatcher.cpp b/clang-tools-extra/clangd/JSONRPCDispatcher.cpp index f05984939324..ba7941bf36da 100644 --- a/clang-tools-extra/clangd/JSONRPCDispatcher.cpp +++ b/clang-tools-extra/clangd/JSONRPCDispatcher.cpp @@ -29,26 +29,26 @@ class RequestSpan { RequestSpan(json::obj *Args) : Args(Args) {} std::mutex Mu; json::obj *Args; - static Key> Key; + static Key> RSKey; public: // Return a context that's aware of the enclosing request, identified by Span. static Context stash(const trace::Span &Span) { - return Span.Ctx.derive(RequestSpan::Key, std::unique_ptr( + return Span.Ctx.derive(RSKey, std::unique_ptr( new RequestSpan(Span.Args))); } // If there's an enclosing request and the tracer is interested, calls \p F // with a json::obj where request info can be added. template static void attach(const Context &Ctx, Func &&F) { - auto *RequestArgs = Ctx.get(RequestSpan::Key); + auto *RequestArgs = Ctx.get(RSKey); if (!RequestArgs || !*RequestArgs || !(*RequestArgs)->Args) return; std::lock_guard Lock((*RequestArgs)->Mu); F(*(*RequestArgs)->Args); } }; -Key> RequestSpan::Key; +Key> RequestSpan::RSKey; } // namespace void JSONOutput::writeMessage(const json::Expr &Message) {