[clang-tools-extra] [clangd] fix compilation errors with newer versions of gRPC (PR #67258)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 24 01:47:48 PDT 2023
https://github.com/0xacc created https://github.com/llvm/llvm-project/pull/67258
in recent versions of gRPC, header files with prefix `grpc++` are deprecated.
gRPC headers in include/grpc++ are deprecated since gRPC 1.10.0 https://github.com/grpc/grpc/releases/tag/v1.10.0 , this PR should close https://github.com/clangd/clangd/issues/1603
>From fe6be33d9204f3916bd014c53f0685f04371e2c8 Mon Sep 17 00:00:00 2001
From: 0xacc <82801911+0xacc at users.noreply.github.com>
Date: Sun, 24 Sep 2023 11:29:28 +0800
Subject: [PATCH] [clangd] fix compilation errors with newer versions of gRPC
in recent versions of gRPC, header files with prefix `grpc++` are deprecated
---
clang-tools-extra/clangd/index/remote/Client.cpp | 2 +-
clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp | 2 +-
clang-tools-extra/clangd/index/remote/server/Server.cpp | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/clang-tools-extra/clangd/index/remote/Client.cpp b/clang-tools-extra/clangd/index/remote/Client.cpp
index 391da3916259c67..bc95d0787fdb74e 100644
--- a/clang-tools-extra/clangd/index/remote/Client.cpp
+++ b/clang-tools-extra/clangd/index/remote/Client.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <grpc++/grpc++.h>
+#include <grpcpp/grpcpp.h>
#include "Client.h"
#include "Feature.h"
diff --git a/clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp b/clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp
index 9a58b5871bfce1a..ad391573804f4da 100644
--- a/clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp
+++ b/clang-tools-extra/clangd/index/remote/monitor/Monitor.cpp
@@ -16,7 +16,7 @@
#include <chrono>
#include <google/protobuf/util/json_util.h>
-#include <grpc++/grpc++.h>
+#include <grpcpp/grpcpp.h>
namespace clang {
namespace clangd {
diff --git a/clang-tools-extra/clangd/index/remote/server/Server.cpp b/clang-tools-extra/clangd/index/remote/server/Server.cpp
index e108d4d0b057ba2..ad075c4446cad18 100644
--- a/clang-tools-extra/clangd/index/remote/server/Server.cpp
+++ b/clang-tools-extra/clangd/index/remote/server/Server.cpp
@@ -33,8 +33,8 @@
#include "llvm/Support/VirtualFileSystem.h"
#include <chrono>
-#include <grpc++/grpc++.h>
-#include <grpc++/health_check_service_interface.h>
+#include <grpcpp/grpcpp.h>
+#include <grpcpp/health_check_service_interface.h>
#include <memory>
#include <optional>
#include <string>
@@ -42,7 +42,7 @@
#include <utility>
#if ENABLE_GRPC_REFLECTION
-#include <grpc++/ext/proto_server_reflection_plugin.h>
+#include <grpcpp/ext/proto_server_reflection_plugin.h>
#endif
#ifdef __GLIBC__
More information about the cfe-commits
mailing list