[PATCH] D89862: [clangd] Give the server information about client's remote index protocol version
Kirill Bobyrev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 22 05:23:01 PDT 2020
kbobyrev updated this revision to Diff 299933.
kbobyrev added a comment.
Remove formatting change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89862/new/
https://reviews.llvm.org/D89862
Files:
clang-tools-extra/clangd/index/remote/Client.cpp
Index: clang-tools-extra/clangd/index/remote/Client.cpp
===================================================================
--- clang-tools-extra/clangd/index/remote/Client.cpp
+++ clang-tools-extra/clangd/index/remote/Client.cpp
@@ -15,6 +15,7 @@
#include "marshalling/Marshalling.h"
#include "support/Logger.h"
#include "support/Trace.h"
+#include "clang/Basic/Version.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
@@ -40,6 +41,7 @@
const auto RPCRequest = ProtobufMarshaller->toProtobuf(Request);
SPAN_ATTACH(Tracer, "Request", RPCRequest.DebugString());
grpc::ClientContext Context;
+ Context.AddMetadata("version", clang::getClangToolFullVersion("clangd"));
std::chrono::system_clock::time_point Deadline =
std::chrono::system_clock::now() + DeadlineWaitingTime;
Context.set_deadline(Deadline);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89862.299933.patch
Type: text/x-patch
Size: 865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201022/ff863e09/attachment.bin>
More information about the cfe-commits
mailing list