[clang-tools-extra] c21378f - [clangd/index/remote]NFC: Adapt code to newer grpc/protobuf versions

Matthias Braun via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 23 11:27:37 PST 2023


Author: Matthias Braun
Date: 2023-02-23T11:26:41-08:00
New Revision: c21378f90a4442810adc4af924a83a9c222fdc51

URL: https://github.com/llvm/llvm-project/commit/c21378f90a4442810adc4af924a83a9c222fdc51
DIFF: https://github.com/llvm/llvm-project/commit/c21378f90a4442810adc4af924a83a9c222fdc51.diff

LOG: [clangd/index/remote]NFC: Adapt code to newer grpc/protobuf versions

It seems newer grpc / protobuf versions renamed
`Status::error_message()` and `Status::error_code()` to `message()` and
`code()` to prepare for replacement with `absl::Status` with the same
names.

As far as I can tell the new names are already available in the
grpc-1.36 version mentioned in the `README` file.

Differential Revision: https://reviews.llvm.org/D144599

Added: 
    

Modified: 
    clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp b/clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp
index 96451f7764675..9a58b5871bfce 100644
--- a/clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp
+++ b/clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp
@@ -67,8 +67,9 @@ int main(int argc, char *argv[]) {
       google::protobuf::util::MessageToJsonString(Response, &Output, Options);
   if (!JsonStatus.ok()) {
     clang::clangd::elog("Can not convert response ({0}) to JSON ({1}): {2}\n",
-                        Response.DebugString(), JsonStatus.error_code(),
-                        JsonStatus.error_message().as_string());
+                        Response.DebugString(),
+                        static_cast<int>(JsonStatus.code()),
+                        JsonStatus.message().as_string());
     return -1;
   }
   llvm::outs() << Output;


        


More information about the cfe-commits mailing list