Skip to content

Commit 4ea4340

Browse files
paulb777wilhuff
andauthored
Upgrade clang-format (#5265)
Co-authored-by: Marek Gilbert <[email protected]>
1 parent 7593515 commit 4ea4340

File tree

66 files changed

+113
-97
lines changed

Some content is hidden

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

66 files changed

+113
-97
lines changed

.clang-format

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ ObjCSpaceBeforeProtocolList: true
66
SpacesInContainerLiterals: true
77
PointerAlignment: Right
88
AllowShortFunctionsOnASingleLine: None
9+
IncludeBlocks: Preserve

Crashlytics/Crashlytics/Components/FIRCLSBinaryImage.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
#pragma once
1616

17+
#include <stdbool.h>
18+
#include <stdint.h>
19+
1720
#include "FIRCLSFeatures.h"
1821
#include "FIRCLSFile.h"
1922
#include "FIRCLSMachO.h"
2023

21-
#include <stdbool.h>
22-
#include <stdint.h>
23-
2424
__BEGIN_DECLS
2525

2626
// Typically, apps seem to have ~300 binary images loaded

Crashlytics/Crashlytics/Components/FIRCLSHost.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
#pragma once
1616

17-
#include "FIRCLSFile.h"
18-
1917
#include <mach/vm_types.h>
2018
#include <sys/cdefs.h>
2119

20+
#include "FIRCLSFile.h"
21+
2222
typedef struct {
2323
const char* documentDirectoryPath;
2424
vm_size_t pageSize;

Crashlytics/Crashlytics/Components/FIRCLSProcess.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
#pragma once
1616

17-
#include "FIRCLSFile.h"
18-
1917
#include <mach/mach.h>
2018
#include <stdbool.h>
2119

20+
#include "FIRCLSFile.h"
21+
2222
typedef struct {
2323
// task info
2424
mach_port_t task;

Crashlytics/Crashlytics/Handlers/FIRCLSHandler.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
#pragma once
1616

17-
#include "FIRCLSFile.h"
18-
1917
#include <mach/mach.h>
2018

19+
#include "FIRCLSFile.h"
20+
2121
__BEGIN_DECLS
2222

2323
void FIRCLSHandler(FIRCLSFile* file, thread_t crashedThread, void* uapVoid);

Crashlytics/Crashlytics/Unwind/Compact/FIRCLSCompactUnwind.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
#pragma once
1616

17-
#include "FIRCLSFeatures.h"
18-
#include "FIRCLSThreadState.h"
19-
2017
#include <stdbool.h>
2118
#include <stdint.h>
2219

20+
#include "FIRCLSFeatures.h"
21+
#include "FIRCLSThreadState.h"
22+
2323
// We have to pack the arrays defined in this header, so
2424
// we can reason about pointer math.
2525
#pragma pack(push)

Crashlytics/Crashlytics/Unwind/Dwarf/FIRCLSDataParsing.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
#pragma once
1616

17-
#include "FIRCLSFeatures.h"
18-
1917
#include <stdint.h>
2018

19+
#include "FIRCLSFeatures.h"
20+
2121
#if CLS_DWARF_UNWINDING_SUPPORTED
2222

2323
#if CLS_CPU_64BIT

Crashlytics/Crashlytics/Unwind/Dwarf/FIRCLSDwarfUnwind.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
#pragma once
1616

17-
#include "FIRCLSDwarfUnwindRegisters.h"
18-
#include "FIRCLSThreadState.h"
19-
2017
#include <stdbool.h>
2118
#include <stdint.h>
2219
#include <sys/types.h>
2320

21+
#include "FIRCLSDwarfUnwindRegisters.h"
22+
#include "FIRCLSThreadState.h"
23+
2424
#if CLS_DWARF_UNWINDING_SUPPORTED
2525

2626
#pragma mark Structures

Crashlytics/Crashlytics/Unwind/FIRCLSUnwind.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#if CLS_COMPACT_UNWINDING_SUPPORTED
2020
#include "FIRCLSCompactUnwind.h"
2121
#endif
22-
#include "FIRCLSUnwind_arch.h"
23-
2422
#include <mach/vm_types.h>
2523
#include <stdbool.h>
2624

25+
#include "FIRCLSUnwind_arch.h"
26+
2727
extern const uint32_t FIRCLSUnwindMaxFrames;
2828

2929
extern const uint32_t FIRCLSUnwindInfiniteRecursionCountThreshold;

Crashlytics/Crashlytics/Unwind/FIRCLSUnwind_arch.h

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#pragma once
1616

1717
#include "FIRCLSFeatures.h"
18-
1918
#include "FIRCLSThreadState.h"
2019
#if CLS_COMPACT_UNWINDING_SUPPORTED
2120
#include "FIRCLSCompactUnwind.h"

Firestore/Example/FuzzTests/FuzzingTargets/FSTFuzzTestFieldPath.h

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#define FIRESTORE_EXAMPLE_FUZZTESTS_FUZZINGTARGETS_FSTFUZZTESTFIELDPATH_H_
1919

2020
#import <Foundation/Foundation.h>
21+
2122
#include <string>
2223

2324
namespace firebase {

Firestore/Example/FuzzTests/FuzzingTargets/FSTFuzzTestSerializer.h

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#define FIRESTORE_EXAMPLE_FUZZTESTS_FUZZINGTARGETS_FSTFUZZTESTSERIALIZER_H_
1919

2020
#import <Foundation/Foundation.h>
21+
2122
#include <string>
2223

2324
namespace firebase {

Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ - (void)testWriteStreamReconnectsAfterIdle {
12271227
FIRFirestore *firestore = doc.firestore;
12281228

12291229
[self writeDocumentRef:doc data:@{@"foo" : @"bar"}];
1230-
[firestore workerQueue] -> RunScheduledOperationsUntil(TimerId::WriteStreamIdle);
1230+
[firestore workerQueue]->RunScheduledOperationsUntil(TimerId::WriteStreamIdle);
12311231
[self writeDocumentRef:doc data:@{@"foo" : @"bar"}];
12321232
}
12331233

@@ -1236,7 +1236,7 @@ - (void)testWatchStreamReconnectsAfterIdle {
12361236
FIRFirestore *firestore = doc.firestore;
12371237

12381238
[self readSnapshotForRef:[self documentRef] requireOnline:YES];
1239-
[firestore workerQueue] -> RunScheduledOperationsUntil(TimerId::ListenStreamIdle);
1239+
[firestore workerQueue]->RunScheduledOperationsUntil(TimerId::ListenStreamIdle);
12401240
[self readSnapshotForRef:[self documentRef] requireOnline:YES];
12411241
}
12421242

Firestore/Example/Tests/Integration/FSTTransactionTests.mm

+4-4
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ - (void)testIncrementTransactionally {
398398
[self writeDocumentRef:doc data:@{@"count" : @(5.0)}];
399399

400400
// Skip backoff delays.
401-
[firestore workerQueue] -> SkipDelaysForTimerId(TimerId::RetryTransaction);
401+
[firestore workerQueue]->SkipDelaysForTimerId(TimerId::RetryTransaction);
402402

403403
// Make 3 transactions that will all increment.
404404
int total = 3;
@@ -443,7 +443,7 @@ - (void)testUpdateTransactionally {
443443
[self writeDocumentRef:doc data:@{@"count" : @(5.0), @"other" : @"yes"}];
444444

445445
// Skip backoff delays.
446-
[firestore workerQueue] -> SkipDelaysForTimerId(TimerId::RetryTransaction);
446+
[firestore workerQueue]->SkipDelaysForTimerId(TimerId::RetryTransaction);
447447

448448
// Make 3 transactions that will all increment.
449449
int total = 3;
@@ -492,7 +492,7 @@ - (void)testRetriesWhenDocumentThatWasReadWithoutBeingWrittenChanges {
492492
[self writeDocumentRef:doc1 data:@{@"count" : @(15.0)}];
493493

494494
// Skip backoff delays.
495-
[firestore workerQueue] -> SkipDelaysForTimerId(TimerId::RetryTransaction);
495+
[firestore workerQueue]->SkipDelaysForTimerId(TimerId::RetryTransaction);
496496

497497
XCTestExpectation *expectation = [self expectationWithDescription:@"transaction"];
498498
[firestore
@@ -537,7 +537,7 @@ - (void)testReadingADocTwiceWithDifferentVersions {
537537
[self writeDocumentRef:doc data:@{@"count" : @(15.0)}];
538538

539539
// Skip backoff delays.
540-
[firestore workerQueue] -> SkipDelaysForTimerId(TimerId::RetryTransaction);
540+
[firestore workerQueue]->SkipDelaysForTimerId(TimerId::RetryTransaction);
541541

542542
XCTestExpectation *expectation = [self expectationWithDescription:@"transaction"];
543543
[firestore

Firestore/core/.clang-format

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ SpacesInContainerLiterals: true
77
DerivePointerAlignment: false
88
PointerAlignment: Left
99
AllowShortFunctionsOnASingleLine: None
10+
IncludeBlocks: Preserve

Firestore/core/src/firebase/firestore/core/event_manager.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17+
#include "Firestore/core/src/firebase/firestore/core/event_manager.h"
18+
1719
#include <utility>
1820

19-
#include "Firestore/core/src/firebase/firestore/core/event_manager.h"
2021
#include "Firestore/core/src/firebase/firestore/core/query_listener.h"
2122
#include "Firestore/core/src/firebase/firestore/core/sync_engine.h"
2223
#include "Firestore/core/src/firebase/firestore/util/hard_assert.h"

Firestore/core/src/firebase/firestore/core/target_id_generator.cc

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include "Firestore/core/src/firebase/firestore/core/target_id_generator.h"
18+
1819
#include "Firestore/core/src/firebase/firestore/util/hard_assert.h"
1920

2021
using firebase::firestore::model::TargetId;

Firestore/core/src/firebase/firestore/core/transaction_runner.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17+
#include "Firestore/core/src/firebase/firestore/core/transaction_runner.h"
18+
1719
#include <utility>
1820

19-
#include "Firestore/core/src/firebase/firestore/core/transaction_runner.h"
2021
#include "Firestore/core/src/firebase/firestore/remote/exponential_backoff.h"
2122
#include "absl/algorithm/container.h"
2223

Firestore/core/src/firebase/firestore/local/index_free_query_engine.h

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_INDEX_FREE_QUERY_ENGINE_H_
1919

2020
#include "Firestore/core/src/firebase/firestore/local/query_engine.h"
21-
2221
#include "Firestore/core/src/firebase/firestore/model/model_fwd.h"
2322

2423
namespace firebase {

Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.cc

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <utility>
2222

2323
#include "Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h"
24-
2524
#include "Firestore/core/src/firebase/firestore/core/query.h"
2625
#include "Firestore/core/src/firebase/firestore/local/leveldb_key.h"
2726
#include "Firestore/core/src/firebase/firestore/local/leveldb_persistence.h"

Firestore/core/src/firebase/firestore/remote/grpc_connection.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Google
2+
* Copyright 2018 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,8 +22,6 @@
2222
#include <unordered_map>
2323
#include <vector>
2424

25-
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
26-
2725
#include "Firestore/core/src/firebase/firestore/auth/token.h"
2826
#include "Firestore/core/src/firebase/firestore/core/database_info.h"
2927
#include "Firestore/core/src/firebase/firestore/remote/connectivity_monitor.h"
@@ -33,10 +31,12 @@
3331
#include "Firestore/core/src/firebase/firestore/remote/grpc_streaming_reader.h"
3432
#include "Firestore/core/src/firebase/firestore/remote/grpc_unary_call.h"
3533
#include "Firestore/core/src/firebase/firestore/util/path.h"
34+
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
3635
#include "absl/strings/string_view.h"
3736
#include "grpcpp/channel.h"
3837
#include "grpcpp/client_context.h"
3938
#include "grpcpp/completion_queue.h"
39+
4040
SUPPRESS_DOCUMENTATION_WARNINGS_BEGIN()
4141
#include "grpcpp/generic/generic_stub.h"
4242
SUPPRESS_END()

Firestore/core/src/firebase/firestore/remote/grpc_root_certificates_generated.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright 2019 Google Inc. All Rights Reserved.
22

3-
#include <cstdlib>
4-
53
#include "Firestore/core/src/firebase/firestore/remote/grpc_root_certificates_generated.h"
64

5+
#include <cstdlib>
6+
77
namespace firebase {
88
namespace firestore {
99
namespace remote {

Firestore/core/src/firebase/firestore/remote/grpc_stream.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Google
2+
* Copyright 2018 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,19 +25,19 @@
2525
#include <utility>
2626
#include <vector>
2727

28-
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
29-
3028
#include "Firestore/core/src/firebase/firestore/remote/grpc_call.h"
3129
#include "Firestore/core/src/firebase/firestore/remote/grpc_completion.h"
3230
#include "Firestore/core/src/firebase/firestore/remote/grpc_stream_observer.h"
3331
#include "Firestore/core/src/firebase/firestore/util/async_queue.h"
3432
#include "Firestore/core/src/firebase/firestore/util/status_fwd.h"
33+
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
3534
#include "absl/types/optional.h"
3635
#include "grpcpp/client_context.h"
36+
#include "grpcpp/support/byte_buffer.h"
37+
3738
SUPPRESS_DOCUMENTATION_WARNINGS_BEGIN()
3839
#include "grpcpp/generic/generic_stub.h"
3940
SUPPRESS_END()
40-
#include "grpcpp/support/byte_buffer.h"
4141

4242
namespace firebase {
4343
namespace firestore {

Firestore/core/src/firebase/firestore/remote/grpc_streaming_reader.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Google
2+
* Copyright 2018 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,16 +22,16 @@
2222
#include <memory>
2323
#include <vector>
2424

25-
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
26-
2725
#include "Firestore/core/src/firebase/firestore/remote/grpc_stream.h"
2826
#include "Firestore/core/src/firebase/firestore/remote/grpc_stream_observer.h"
2927
#include "Firestore/core/src/firebase/firestore/util/status_fwd.h"
28+
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
3029
#include "grpcpp/client_context.h"
30+
#include "grpcpp/support/byte_buffer.h"
31+
3132
SUPPRESS_DOCUMENTATION_WARNINGS_BEGIN()
3233
#include "grpcpp/generic/generic_stub.h"
3334
SUPPRESS_END()
34-
#include "grpcpp/support/byte_buffer.h"
3535

3636
namespace firebase {
3737
namespace firestore {

Firestore/core/src/firebase/firestore/remote/grpc_unary_call.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Google
2+
* Copyright 2018 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,17 +21,17 @@
2121
#include <map>
2222
#include <memory>
2323

24-
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
25-
2624
#include "Firestore/core/src/firebase/firestore/remote/grpc_call.h"
2725
#include "Firestore/core/src/firebase/firestore/remote/grpc_completion.h"
2826
#include "Firestore/core/src/firebase/firestore/util/async_queue.h"
2927
#include "Firestore/core/src/firebase/firestore/util/status_fwd.h"
28+
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
3029
#include "grpcpp/client_context.h"
30+
#include "grpcpp/support/byte_buffer.h"
31+
3132
SUPPRESS_DOCUMENTATION_WARNINGS_BEGIN()
3233
#include "grpcpp/generic/generic_stub.h"
3334
SUPPRESS_END()
34-
#include "grpcpp/support/byte_buffer.h"
3535

3636
namespace firebase {
3737
namespace firestore {

Firestore/core/src/firebase/firestore/remote/watch_stream.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
#include <utility>
18-
1917
#include "Firestore/core/src/firebase/firestore/remote/watch_stream.h"
2018

19+
#include <utility>
20+
2121
#include "Firestore/core/src/firebase/firestore/model/mutation.h"
2222
#include "Firestore/core/src/firebase/firestore/nanopb/message.h"
2323
#include "Firestore/core/src/firebase/firestore/nanopb/reader.h"

0 commit comments

Comments
 (0)