Skip to content

Commit

Permalink
Upgrade clang-format (#5265)
Browse files Browse the repository at this point in the history
Co-authored-by: Marek Gilbert <[email protected]>
  • Loading branch information
paulb777 and wilhuff authored Apr 3, 2020
1 parent 7593515 commit 4ea4340
Show file tree
Hide file tree
Showing 66 changed files with 113 additions and 97 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ObjCSpaceBeforeProtocolList: true
SpacesInContainerLiterals: true
PointerAlignment: Right
AllowShortFunctionsOnASingleLine: None
IncludeBlocks: Preserve
6 changes: 3 additions & 3 deletions Crashlytics/Crashlytics/Components/FIRCLSBinaryImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

#pragma once

#include <stdbool.h>
#include <stdint.h>

#include "FIRCLSFeatures.h"
#include "FIRCLSFile.h"
#include "FIRCLSMachO.h"

#include <stdbool.h>
#include <stdint.h>

__BEGIN_DECLS

// Typically, apps seem to have ~300 binary images loaded
Expand Down
4 changes: 2 additions & 2 deletions Crashlytics/Crashlytics/Components/FIRCLSHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

#pragma once

#include "FIRCLSFile.h"

#include <mach/vm_types.h>
#include <sys/cdefs.h>

#include "FIRCLSFile.h"

typedef struct {
const char* documentDirectoryPath;
vm_size_t pageSize;
Expand Down
4 changes: 2 additions & 2 deletions Crashlytics/Crashlytics/Components/FIRCLSProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

#pragma once

#include "FIRCLSFile.h"

#include <mach/mach.h>
#include <stdbool.h>

#include "FIRCLSFile.h"

typedef struct {
// task info
mach_port_t task;
Expand Down
4 changes: 2 additions & 2 deletions Crashlytics/Crashlytics/Handlers/FIRCLSHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

#pragma once

#include "FIRCLSFile.h"

#include <mach/mach.h>

#include "FIRCLSFile.h"

__BEGIN_DECLS

void FIRCLSHandler(FIRCLSFile* file, thread_t crashedThread, void* uapVoid);
Expand Down
6 changes: 3 additions & 3 deletions Crashlytics/Crashlytics/Unwind/Compact/FIRCLSCompactUnwind.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

#pragma once

#include "FIRCLSFeatures.h"
#include "FIRCLSThreadState.h"

#include <stdbool.h>
#include <stdint.h>

#include "FIRCLSFeatures.h"
#include "FIRCLSThreadState.h"

// We have to pack the arrays defined in this header, so
// we can reason about pointer math.
#pragma pack(push)
Expand Down
4 changes: 2 additions & 2 deletions Crashlytics/Crashlytics/Unwind/Dwarf/FIRCLSDataParsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

#pragma once

#include "FIRCLSFeatures.h"

#include <stdint.h>

#include "FIRCLSFeatures.h"

#if CLS_DWARF_UNWINDING_SUPPORTED

#if CLS_CPU_64BIT
Expand Down
6 changes: 3 additions & 3 deletions Crashlytics/Crashlytics/Unwind/Dwarf/FIRCLSDwarfUnwind.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

#pragma once

#include "FIRCLSDwarfUnwindRegisters.h"
#include "FIRCLSThreadState.h"

#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>

#include "FIRCLSDwarfUnwindRegisters.h"
#include "FIRCLSThreadState.h"

#if CLS_DWARF_UNWINDING_SUPPORTED

#pragma mark Structures
Expand Down
4 changes: 2 additions & 2 deletions Crashlytics/Crashlytics/Unwind/FIRCLSUnwind.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#if CLS_COMPACT_UNWINDING_SUPPORTED
#include "FIRCLSCompactUnwind.h"
#endif
#include "FIRCLSUnwind_arch.h"

#include <mach/vm_types.h>
#include <stdbool.h>

#include "FIRCLSUnwind_arch.h"

extern const uint32_t FIRCLSUnwindMaxFrames;

extern const uint32_t FIRCLSUnwindInfiniteRecursionCountThreshold;
Expand Down
1 change: 0 additions & 1 deletion Crashlytics/Crashlytics/Unwind/FIRCLSUnwind_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#pragma once

#include "FIRCLSFeatures.h"

#include "FIRCLSThreadState.h"
#if CLS_COMPACT_UNWINDING_SUPPORTED
#include "FIRCLSCompactUnwind.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define FIRESTORE_EXAMPLE_FUZZTESTS_FUZZINGTARGETS_FSTFUZZTESTFIELDPATH_H_

#import <Foundation/Foundation.h>

#include <string>

namespace firebase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define FIRESTORE_EXAMPLE_FUZZTESTS_FUZZINGTARGETS_FSTFUZZTESTSERIALIZER_H_

#import <Foundation/Foundation.h>

#include <string>

namespace firebase {
Expand Down
4 changes: 2 additions & 2 deletions Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ - (void)testWriteStreamReconnectsAfterIdle {
FIRFirestore *firestore = doc.firestore;

[self writeDocumentRef:doc data:@{@"foo" : @"bar"}];
[firestore workerQueue] -> RunScheduledOperationsUntil(TimerId::WriteStreamIdle);
[firestore workerQueue]->RunScheduledOperationsUntil(TimerId::WriteStreamIdle);
[self writeDocumentRef:doc data:@{@"foo" : @"bar"}];
}

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

[self readSnapshotForRef:[self documentRef] requireOnline:YES];
[firestore workerQueue] -> RunScheduledOperationsUntil(TimerId::ListenStreamIdle);
[firestore workerQueue]->RunScheduledOperationsUntil(TimerId::ListenStreamIdle);
[self readSnapshotForRef:[self documentRef] requireOnline:YES];
}

Expand Down
8 changes: 4 additions & 4 deletions Firestore/Example/Tests/Integration/FSTTransactionTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ - (void)testIncrementTransactionally {
[self writeDocumentRef:doc data:@{@"count" : @(5.0)}];

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

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

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

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

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

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

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

XCTestExpectation *expectation = [self expectationWithDescription:@"transaction"];
[firestore
Expand Down
1 change: 1 addition & 0 deletions Firestore/core/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ SpacesInContainerLiterals: true
DerivePointerAlignment: false
PointerAlignment: Left
AllowShortFunctionsOnASingleLine: None
IncludeBlocks: Preserve
3 changes: 2 additions & 1 deletion Firestore/core/src/firebase/firestore/core/event_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
* limitations under the License.
*/

#include "Firestore/core/src/firebase/firestore/core/event_manager.h"

#include <utility>

#include "Firestore/core/src/firebase/firestore/core/event_manager.h"
#include "Firestore/core/src/firebase/firestore/core/query_listener.h"
#include "Firestore/core/src/firebase/firestore/core/sync_engine.h"
#include "Firestore/core/src/firebase/firestore/util/hard_assert.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "Firestore/core/src/firebase/firestore/core/target_id_generator.h"

#include "Firestore/core/src/firebase/firestore/util/hard_assert.h"

using firebase::firestore::model::TargetId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
* limitations under the License.
*/

#include "Firestore/core/src/firebase/firestore/core/transaction_runner.h"

#include <utility>

#include "Firestore/core/src/firebase/firestore/core/transaction_runner.h"
#include "Firestore/core/src/firebase/firestore/remote/exponential_backoff.h"
#include "absl/algorithm/container.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_INDEX_FREE_QUERY_ENGINE_H_

#include "Firestore/core/src/firebase/firestore/local/query_engine.h"

#include "Firestore/core/src/firebase/firestore/model/model_fwd.h"

namespace firebase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <utility>

#include "Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h"

#include "Firestore/core/src/firebase/firestore/core/query.h"
#include "Firestore/core/src/firebase/firestore/local/leveldb_key.h"
#include "Firestore/core/src/firebase/firestore/local/leveldb_persistence.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Google
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,6 @@
#include <unordered_map>
#include <vector>

#include "Firestore/core/src/firebase/firestore/util/warnings.h"

#include "Firestore/core/src/firebase/firestore/auth/token.h"
#include "Firestore/core/src/firebase/firestore/core/database_info.h"
#include "Firestore/core/src/firebase/firestore/remote/connectivity_monitor.h"
Expand All @@ -33,10 +31,12 @@
#include "Firestore/core/src/firebase/firestore/remote/grpc_streaming_reader.h"
#include "Firestore/core/src/firebase/firestore/remote/grpc_unary_call.h"
#include "Firestore/core/src/firebase/firestore/util/path.h"
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
#include "absl/strings/string_view.h"
#include "grpcpp/channel.h"
#include "grpcpp/client_context.h"
#include "grpcpp/completion_queue.h"

SUPPRESS_DOCUMENTATION_WARNINGS_BEGIN()
#include "grpcpp/generic/generic_stub.h"
SUPPRESS_END()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2019 Google Inc. All Rights Reserved.

#include <cstdlib>

#include "Firestore/core/src/firebase/firestore/remote/grpc_root_certificates_generated.h"

#include <cstdlib>

namespace firebase {
namespace firestore {
namespace remote {
Expand Down
8 changes: 4 additions & 4 deletions Firestore/core/src/firebase/firestore/remote/grpc_stream.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Google
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,19 +25,19 @@
#include <utility>
#include <vector>

#include "Firestore/core/src/firebase/firestore/util/warnings.h"

#include "Firestore/core/src/firebase/firestore/remote/grpc_call.h"
#include "Firestore/core/src/firebase/firestore/remote/grpc_completion.h"
#include "Firestore/core/src/firebase/firestore/remote/grpc_stream_observer.h"
#include "Firestore/core/src/firebase/firestore/util/async_queue.h"
#include "Firestore/core/src/firebase/firestore/util/status_fwd.h"
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
#include "absl/types/optional.h"
#include "grpcpp/client_context.h"
#include "grpcpp/support/byte_buffer.h"

SUPPRESS_DOCUMENTATION_WARNINGS_BEGIN()
#include "grpcpp/generic/generic_stub.h"
SUPPRESS_END()
#include "grpcpp/support/byte_buffer.h"

namespace firebase {
namespace firestore {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Google
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,16 +22,16 @@
#include <memory>
#include <vector>

#include "Firestore/core/src/firebase/firestore/util/warnings.h"

#include "Firestore/core/src/firebase/firestore/remote/grpc_stream.h"
#include "Firestore/core/src/firebase/firestore/remote/grpc_stream_observer.h"
#include "Firestore/core/src/firebase/firestore/util/status_fwd.h"
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
#include "grpcpp/client_context.h"
#include "grpcpp/support/byte_buffer.h"

SUPPRESS_DOCUMENTATION_WARNINGS_BEGIN()
#include "grpcpp/generic/generic_stub.h"
SUPPRESS_END()
#include "grpcpp/support/byte_buffer.h"

namespace firebase {
namespace firestore {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Google
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,17 +21,17 @@
#include <map>
#include <memory>

#include "Firestore/core/src/firebase/firestore/util/warnings.h"

#include "Firestore/core/src/firebase/firestore/remote/grpc_call.h"
#include "Firestore/core/src/firebase/firestore/remote/grpc_completion.h"
#include "Firestore/core/src/firebase/firestore/util/async_queue.h"
#include "Firestore/core/src/firebase/firestore/util/status_fwd.h"
#include "Firestore/core/src/firebase/firestore/util/warnings.h"
#include "grpcpp/client_context.h"
#include "grpcpp/support/byte_buffer.h"

SUPPRESS_DOCUMENTATION_WARNINGS_BEGIN()
#include "grpcpp/generic/generic_stub.h"
SUPPRESS_END()
#include "grpcpp/support/byte_buffer.h"

namespace firebase {
namespace firestore {
Expand Down
4 changes: 2 additions & 2 deletions Firestore/core/src/firebase/firestore/remote/watch_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

#include <utility>

#include "Firestore/core/src/firebase/firestore/remote/watch_stream.h"

#include <utility>

#include "Firestore/core/src/firebase/firestore/model/mutation.h"
#include "Firestore/core/src/firebase/firestore/nanopb/message.h"
#include "Firestore/core/src/firebase/firestore/nanopb/reader.h"
Expand Down
Loading

0 comments on commit 4ea4340

Please sign in to comment.