diff options
author | Craig Tiller <ctiller@google.com> | 2024-04-09 15:45:18 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-04-09 15:57:54 -0700 |
commit | 0d2ad09038c27b6116be4088c14aa3d25632c409 (patch) | |
tree | 27d3b0375375daf1b6e33fb8d60ef276fc248126 | |
parent | 0c742dbbb385794c49aa6c20a6d474717103204b (diff) | |
download | grpc-grpc-0d2ad09038c27b6116be4088c14aa3d25632c409.tar.gz |
[clang-format] Remove requirement that port_platform.h is at the top (#36276)
Closes #36276
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36276 from ctiller:port_platform-include-grpcpp-clang-format 324257753042129f795e03574d8a4cb58be72c26
PiperOrigin-RevId: 623302430
-rw-r--r-- | include/grpcpp/.clang-format | 3 | ||||
-rw-r--r-- | include/grpcpp/create_channel_posix.h | 3 | ||||
-rw-r--r-- | include/grpcpp/ext/channelz_service_plugin.h | 1 | ||||
-rw-r--r-- | include/grpcpp/ext/csm_observability.h | 3 | ||||
-rw-r--r-- | include/grpcpp/ext/gcp_observability.h | 3 | ||||
-rw-r--r-- | include/grpcpp/ext/otel_plugin.h | 3 | ||||
-rw-r--r-- | include/grpcpp/ext/server_load_reporting.h | 3 | ||||
-rw-r--r-- | include/grpcpp/generic/async_generic_service.h | 1 | ||||
-rw-r--r-- | include/grpcpp/server.h | 3 | ||||
-rw-r--r-- | include/grpcpp/server_builder.h | 3 | ||||
-rw-r--r-- | include/grpcpp/server_context.h | 3 | ||||
-rw-r--r-- | include/grpcpp/server_interface.h | 3 | ||||
-rw-r--r-- | include/grpcpp/server_posix.h | 3 | ||||
-rw-r--r-- | include/grpcpp/xds_server_builder.h | 1 |
14 files changed, 10 insertions, 26 deletions
diff --git a/include/grpcpp/.clang-format b/include/grpcpp/.clang-format index 64387e9e51..5f150ef6ed 100644 --- a/include/grpcpp/.clang-format +++ b/include/grpcpp/.clang-format @@ -5,9 +5,6 @@ DerivePointerAlignment: false PointerAlignment: Left IncludeBlocks: Regroup IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^<grpc/(support|impl/codegen)/port_platform.h>' - Priority: -100 # ruby.h is even more first if it's included - Regex: '^<ruby/ruby.h>' Priority: -200 diff --git a/include/grpcpp/create_channel_posix.h b/include/grpcpp/create_channel_posix.h index 651471da01..c4eb30c8d8 100644 --- a/include/grpcpp/create_channel_posix.h +++ b/include/grpcpp/create_channel_posix.h @@ -19,10 +19,9 @@ #ifndef GRPCPP_CREATE_CHANNEL_POSIX_H #define GRPCPP_CREATE_CHANNEL_POSIX_H -#include <grpc/support/port_platform.h> - #include <memory> +#include <grpc/support/port_platform.h> #include <grpcpp/channel.h> #include <grpcpp/support/channel_arguments.h> diff --git a/include/grpcpp/ext/channelz_service_plugin.h b/include/grpcpp/ext/channelz_service_plugin.h index 23882abb50..c048fce28f 100644 --- a/include/grpcpp/ext/channelz_service_plugin.h +++ b/include/grpcpp/ext/channelz_service_plugin.h @@ -20,7 +20,6 @@ #define GRPCPP_EXT_CHANNELZ_SERVICE_PLUGIN_H #include <grpc/support/port_platform.h> - #include <grpcpp/impl/server_builder_plugin.h> #include <grpcpp/impl/server_initializer.h> #include <grpcpp/support/config.h> diff --git a/include/grpcpp/ext/csm_observability.h b/include/grpcpp/ext/csm_observability.h index dcb7bd8c29..af7b42f4d1 100644 --- a/include/grpcpp/ext/csm_observability.h +++ b/include/grpcpp/ext/csm_observability.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_EXT_CSM_OBSERVABILITY_H #define GRPCPP_EXT_CSM_OBSERVABILITY_H -#include <grpc/support/port_platform.h> - #include <memory> #include "absl/functional/any_invocable.h" @@ -28,6 +26,7 @@ #include "absl/strings/string_view.h" #include "opentelemetry/metrics/meter_provider.h" +#include <grpc/support/port_platform.h> #include <grpcpp/ext/otel_plugin.h> namespace grpc { diff --git a/include/grpcpp/ext/gcp_observability.h b/include/grpcpp/ext/gcp_observability.h index b215312c68..df270bec88 100644 --- a/include/grpcpp/ext/gcp_observability.h +++ b/include/grpcpp/ext/gcp_observability.h @@ -17,11 +17,10 @@ #ifndef GRPCPP_EXT_GCP_OBSERVABILITY_H #define GRPCPP_EXT_GCP_OBSERVABILITY_H -#include <grpc/support/port_platform.h> - #include "absl/status/status.h" #include "absl/status/statusor.h" +#include <grpc/support/port_platform.h> #include <grpcpp/impl/grpc_library.h> namespace grpc { diff --git a/include/grpcpp/ext/otel_plugin.h b/include/grpcpp/ext/otel_plugin.h index c35f02dcb0..c9327d68d0 100644 --- a/include/grpcpp/ext/otel_plugin.h +++ b/include/grpcpp/ext/otel_plugin.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_EXT_OTEL_PLUGIN_H #define GRPCPP_EXT_OTEL_PLUGIN_H -#include <grpc/support/port_platform.h> - #include <stddef.h> #include <stdint.h> @@ -32,6 +30,7 @@ #include "opentelemetry/metrics/meter_provider.h" #include <grpc/support/metrics.h> +#include <grpc/support/port_platform.h> namespace grpc { diff --git a/include/grpcpp/ext/server_load_reporting.h b/include/grpcpp/ext/server_load_reporting.h index 8b4e7e371f..416e9548fb 100644 --- a/include/grpcpp/ext/server_load_reporting.h +++ b/include/grpcpp/ext/server_load_reporting.h @@ -19,9 +19,8 @@ #ifndef GRPCPP_EXT_SERVER_LOAD_REPORTING_H #define GRPCPP_EXT_SERVER_LOAD_REPORTING_H -#include <grpc/support/port_platform.h> - #include <grpc/load_reporting.h> +#include <grpc/support/port_platform.h> #include <grpcpp/impl/server_builder_option.h> #include <grpcpp/server_context.h> #include <grpcpp/support/config.h> diff --git a/include/grpcpp/generic/async_generic_service.h b/include/grpcpp/generic/async_generic_service.h index cd9d43dfe3..77525d13b2 100644 --- a/include/grpcpp/generic/async_generic_service.h +++ b/include/grpcpp/generic/async_generic_service.h @@ -20,7 +20,6 @@ #define GRPCPP_GENERIC_ASYNC_GENERIC_SERVICE_H #include <grpc/support/port_platform.h> - #include <grpcpp/impl/server_callback_handlers.h> #include <grpcpp/support/async_stream.h> #include <grpcpp/support/byte_buffer.h> diff --git a/include/grpcpp/server.h b/include/grpcpp/server.h index 63ae1c69d6..3c56b6a06a 100644 --- a/include/grpcpp/server.h +++ b/include/grpcpp/server.h @@ -19,14 +19,13 @@ #ifndef GRPCPP_SERVER_H #define GRPCPP_SERVER_H -#include <grpc/support/port_platform.h> - #include <list> #include <memory> #include <vector> #include <grpc/compression.h> #include <grpc/support/atm.h> +#include <grpc/support/port_platform.h> #include <grpcpp/channel.h> #include <grpcpp/completion_queue.h> #include <grpcpp/health_check_service_interface.h> diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index 9f5e2cc7dc..e6266a90d9 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_SERVER_BUILDER_H #define GRPCPP_SERVER_BUILDER_H -#include <grpc/support/port_platform.h> - #include <climits> #include <map> #include <memory> @@ -28,6 +26,7 @@ #include <grpc/compression.h> #include <grpc/support/cpu.h> +#include <grpc/support/port_platform.h> #include <grpc/support/workaround_list.h> #include <grpcpp/impl/channel_argument_option.h> #include <grpcpp/impl/server_builder_option.h> diff --git a/include/grpcpp/server_context.h b/include/grpcpp/server_context.h index d860be1609..eb72e36b4a 100644 --- a/include/grpcpp/server_context.h +++ b/include/grpcpp/server_context.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_SERVER_CONTEXT_H #define GRPCPP_SERVER_CONTEXT_H -#include <grpc/support/port_platform.h> - #include <atomic> #include <cassert> #include <map> @@ -31,6 +29,7 @@ #include <grpc/grpc.h> #include <grpc/impl/call.h> #include <grpc/impl/compression_types.h> +#include <grpc/support/port_platform.h> #include <grpcpp/impl/call.h> #include <grpcpp/impl/call_op_set.h> #include <grpcpp/impl/codegen/create_auth_context.h> diff --git a/include/grpcpp/server_interface.h b/include/grpcpp/server_interface.h index d990d8c7ac..5f8f8b54b0 100644 --- a/include/grpcpp/server_interface.h +++ b/include/grpcpp/server_interface.h @@ -19,11 +19,10 @@ #ifndef GRPCPP_SERVER_INTERFACE_H #define GRPCPP_SERVER_INTERFACE_H -#include <grpc/support/port_platform.h> - #include <grpc/grpc.h> #include <grpc/impl/grpc_types.h> #include <grpc/support/log.h> +#include <grpc/support/port_platform.h> #include <grpc/support/time.h> #include <grpcpp/impl/call.h> #include <grpcpp/impl/call_hook.h> diff --git a/include/grpcpp/server_posix.h b/include/grpcpp/server_posix.h index 75ef4470b7..8132c01cf9 100644 --- a/include/grpcpp/server_posix.h +++ b/include/grpcpp/server_posix.h @@ -19,10 +19,9 @@ #ifndef GRPCPP_SERVER_POSIX_H #define GRPCPP_SERVER_POSIX_H -#include <grpc/support/port_platform.h> - #include <memory> +#include <grpc/support/port_platform.h> #include <grpcpp/server.h> namespace grpc { diff --git a/include/grpcpp/xds_server_builder.h b/include/grpcpp/xds_server_builder.h index f51c526078..27ee76aa7a 100644 --- a/include/grpcpp/xds_server_builder.h +++ b/include/grpcpp/xds_server_builder.h @@ -20,7 +20,6 @@ #define GRPCPP_XDS_SERVER_BUILDER_H #include <grpc/support/port_platform.h> - #include <grpcpp/server_builder.h> namespace grpc { |