[clang-tools-extra] r344676 - [clangd] Hide unused function. NFC
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 17 00:41:53 PDT 2018
Author: sammccall
Date: Wed Oct 17 00:41:53 2018
New Revision: 344676
URL: http://llvm.org/viewvc/llvm-project?rev=344676&view=rev
Log:
[clangd] Hide unused function. NFC
Modified:
clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp
clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h
Modified: clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp?rev=344676&r1=344675&r2=344676&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp (original)
+++ clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp Wed Oct 17 00:41:53 2018
@@ -58,7 +58,7 @@ Key<std::unique_ptr<RequestSpan>> Reques
} // namespace
void clangd::reply(json::Value &&Result) {
- auto ID = getRequestId();
+ auto ID = Context::current().get(RequestID);
if (!ID) {
elog("Attempted to reply to a notification!");
return;
@@ -77,7 +77,7 @@ void clangd::replyError(ErrorCode Code,
{"message", Message.str()}};
});
- if (auto ID = getRequestId()) {
+ if (auto ID = Context::current().get(RequestID)) {
log("--> reply({0}) error: {1}", *ID, Message);
Context::current()
.getExisting(CurrentTransport)
@@ -206,7 +206,3 @@ llvm::Error JSONRPCDispatcher::runLangua
WithContextValue WithTransport(CurrentTransport, &Transport);
return Transport.loop(*this);
}
-
-const json::Value *clangd::getRequestId() {
- return Context::current().get(RequestID);
-}
Modified: clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h?rev=344676&r1=344675&r2=344676&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h (original)
+++ clang-tools-extra/trunk/clangd/JSONRPCDispatcher.h Wed Oct 17 00:41:53 2018
@@ -35,9 +35,6 @@ void replyError(ErrorCode Code, const ll
/// fetches the related message from error's message method. If error doesn't
/// match any known errors, uses ErrorCode::InvalidParams for the error.
void replyError(llvm::Error E);
-/// Returns the request-id of the current request. Should not be used directly
-/// for replying to requests, use the above mentioned methods for that case.
-const llvm::json::Value *getRequestId();
/// Sends a request to the client.
/// Current context must derive from JSONRPCDispatcher::Handler.
void call(llvm::StringRef Method, llvm::json::Value &&Params);
More information about the cfe-commits
mailing list