Skip to content

Commit 0581eb1

Browse files
ctillercopybara-github
authored andcommitted
[clang-format] Remove requirement that port_platform.h is at the top (grpc#36282)
Closes grpc#36282 COPYBARA_INTEGRATE_REVIEW=grpc#36282 from ctiller:port_platform-src-clang-format f1f21c7 PiperOrigin-RevId: 623689304
1 parent 414ff20 commit 0581eb1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+72
-115
lines changed

src/.clang-format

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ DerivePointerAlignment: false
55
PointerAlignment: Left
66
IncludeBlocks: Regroup
77
IncludeCategories:
8-
# port_platform.h is before almost everything
9-
- Regex: '^<grpc/(support|impl/codegen)/port_platform.h>'
10-
Priority: -100
118
# ruby.h is even more first if it's included
129
- Regex: '^<ruby/ruby.h>'
1310
Priority: -200

src/cpp/client/call_credentials.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
#include <grpc/support/port_platform.h>
15-
1614
#include "absl/strings/str_cat.h"
1715

16+
#include <grpc/support/port_platform.h>
1817
#include <grpcpp/security/credentials.h>
1918

2019
#include "src/core/lib/security/credentials/credentials.h"

src/cpp/client/channel_credentials.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
#include <grpc/support/port_platform.h>
15-
1614
#include <memory>
1715
#include <string>
1816
#include <vector>
1917

2018
#include <grpc/grpc.h>
2119
#include <grpc/grpc_security.h>
20+
#include <grpc/support/port_platform.h>
2221
#include <grpcpp/security/credentials.h>
2322
#include <grpcpp/support/channel_arguments.h>
2423

src/cpp/common/alarm.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
//
1616
//
1717

18-
#include <grpc/support/port_platform.h>
19-
2018
#include <atomic>
2119
#include <functional>
2220
#include <memory>
@@ -27,6 +25,7 @@
2725
#include <grpc/event_engine/event_engine.h>
2826
#include <grpc/grpc.h>
2927
#include <grpc/support/log.h>
28+
#include <grpc/support/port_platform.h>
3029
#include <grpc/support/sync.h>
3130
#include <grpc/support/time.h>
3231
#include <grpcpp/alarm.h>

src/cpp/ext/csm/csm_observability.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
//
1717
//
1818

19-
#include <grpc/support/port_platform.h>
20-
2119
#include "src/cpp/ext/csm/csm_observability.h"
2220

2321
#include <memory>
@@ -33,6 +31,7 @@
3331
#include "opentelemetry/sdk/resource/resource_detector.h"
3432

3533
#include <grpc/support/log.h>
34+
#include <grpc/support/port_platform.h>
3635
#include <grpcpp/ext/csm_observability.h>
3736

3837
#include "src/core/ext/xds/xds_enabled_server.h"

src/cpp/ext/csm/csm_observability.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
#ifndef GRPC_SRC_CPP_EXT_CSM_CSM_OBSERVABILITY_H
2020
#define GRPC_SRC_CPP_EXT_CSM_CSM_OBSERVABILITY_H
2121

22-
#include <grpc/support/port_platform.h>
23-
2422
#include "absl/strings/string_view.h"
2523

24+
#include <grpc/support/port_platform.h>
25+
2626
#include "src/core/lib/channel/channel_args.h"
2727

2828
namespace grpc {

src/cpp/ext/csm/metadata_exchange.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
//
1717
//
1818

19-
#include <grpc/support/port_platform.h>
20-
2119
#include "src/cpp/ext/csm/metadata_exchange.h"
2220

2321
#include <stddef.h>
@@ -38,6 +36,7 @@
3836
#include "upb/base/string_view.h"
3937

4038
#include <grpc/slice.h>
39+
#include <grpc/support/port_platform.h>
4140

4241
#include "src/core/lib/channel/call_tracer.h"
4342
#include "src/core/lib/gprpp/env.h"

src/cpp/ext/csm/metadata_exchange.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#ifndef GRPC_SRC_CPP_EXT_CSM_METADATA_EXCHANGE_H
2020
#define GRPC_SRC_CPP_EXT_CSM_METADATA_EXCHANGE_H
2121

22-
#include <grpc/support/port_platform.h>
23-
2422
#include <memory>
2523
#include <string>
2624
#include <utility>
@@ -31,6 +29,8 @@
3129
#include "opentelemetry/sdk/common/attribute_utils.h"
3230
#include "upb/mem/arena.hpp"
3331

32+
#include <grpc/support/port_platform.h>
33+
3434
#include "src/core/lib/slice/slice.h"
3535
#include "src/core/lib/transport/metadata_batch.h"
3636
#include "src/cpp/ext/otel/otel_plugin.h"

src/cpp/ext/filters/census/client_filter.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
//
1717
//
1818

19-
#include <grpc/support/port_platform.h>
20-
2119
#include "src/cpp/ext/filters/census/client_filter.h"
2220

2321
#include <stddef.h>
@@ -46,6 +44,7 @@
4644

4745
#include <grpc/slice.h>
4846
#include <grpc/support/log.h>
47+
#include <grpc/support/port_platform.h>
4948
#include <grpc/support/time.h>
5049
#include <grpcpp/client_context.h>
5150
#include <grpcpp/opencensus.h>

src/cpp/ext/filters/census/client_filter.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
#ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CLIENT_FILTER_H
2020
#define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CLIENT_FILTER_H
2121

22-
#include <grpc/support/port_platform.h>
23-
2422
#include "absl/status/statusor.h"
2523

24+
#include <grpc/support/port_platform.h>
2625
#include <grpcpp/support/client_interceptor.h>
2726
#include <grpcpp/support/interceptor.h>
2827

0 commit comments

Comments
 (0)