Skip to content

Commit 7c81155

Browse files
mergennachinfacebook-github-bot
authored andcommitted
Fix lint in clang-format (#3041)
Summary: Pull Request resolved: #3041 We are updating to clang-formatter 18. The current clang-format in coreml code has duplicate key. Deleting one of them. See context D56139356 bypass-github-export-checks bypass-github-pytorch-ci-checks bypass-github-executorch-ci-checks Reviewed By: cccclai Differential Revision: D56139927 fbshipit-source-id: 937f58092abd6f695304ee2a5dd38bc4b8412ec0
1 parent 7616d42 commit 7c81155

11 files changed

+19
-12
lines changed

backends/apple/coreml/.clang-format

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
BasedOnStyle: WebKit
2-
BreakBeforeBraces: Attach
32
AllowShortIfStatementsOnASingleLine: false
43
BreakBeforeBinaryOperators: None
54
BreakConstructorInitializers: BeforeColon

backends/apple/coreml/runtime/delegate/ETCoreMLDefaultModelExecutor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
NS_ASSUME_NONNULL_BEGIN
1515
/// The default model executor, the executor ignores logging options.
16-
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLDefaultModelExecutor : NSObject<ETCoreMLModelExecutor>
16+
__attribute__((objc_subclassing_restricted))
17+
@interface ETCoreMLDefaultModelExecutor : NSObject<ETCoreMLModelExecutor>
1718

1819
+ (instancetype)new NS_UNAVAILABLE;
1920

backends/apple/coreml/runtime/delegate/ETCoreMLModelCompiler.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
NS_ASSUME_NONNULL_BEGIN
1111
/// A class responsible for compiling a CoreML model.
12-
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelCompiler : NSObject
12+
__attribute__((objc_subclassing_restricted))
13+
@interface ETCoreMLModelCompiler : NSObject
1314

1415
+ (instancetype)new NS_UNAVAILABLE;
1516

backends/apple/coreml/runtime/delegate/ETCoreMLModelLoader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ struct ModelMetadata;
1616

1717
NS_ASSUME_NONNULL_BEGIN
1818
/// A class responsible for loading a CoreML model.
19-
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelLoader : NSObject
19+
__attribute__((objc_subclassing_restricted))
20+
@interface ETCoreMLModelLoader : NSObject
2021

2122
+ (instancetype)new NS_UNAVAILABLE;
2223

backends/apple/coreml/runtime/delegate/ETCoreMLModelManager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class ModelEventLogger;
2020
typedef void ModelHandle;
2121

2222
/// A class responsible for managing the models loaded by the delegate.
23-
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelManager : NSObject
23+
__attribute__((objc_subclassing_restricted))
24+
@interface ETCoreMLModelManager : NSObject
2425

2526
+ (instancetype)new NS_UNAVAILABLE;
2627

backends/apple/coreml/runtime/kvstore/key_value_store.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ get_create_store_statement(std::string_view store_name, StorageType key_storage_
5353

5454
std::string get_create_index_statement(std::string_view store_name, std::string_view column_name) {
5555
std::stringstream ss;
56-
ss << "CREATE INDEX IF NOT EXISTS " << column_name << "_INDEX"
57-
<< " ON " << store_name << "(" << column_name << ")";
56+
ss << "CREATE INDEX IF NOT EXISTS " << column_name << "_INDEX" << " ON " << store_name << "(" << column_name << ")";
5857

5958
return ss.str();
6059
}

backends/apple/coreml/runtime/sdk/ETCoreMLModelDebugger.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ typedef NSDictionary<ETCoreMLModelStructurePath*, MLMultiArray*> ETCoreMLModelOu
1515

1616
NS_ASSUME_NONNULL_BEGIN
1717
/// A class responsible for debugging a model.
18-
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelDebugger : NSObject
18+
__attribute__((objc_subclassing_restricted))
19+
@interface ETCoreMLModelDebugger : NSObject
1920

2021
- (instancetype)init NS_UNAVAILABLE;
2122

backends/apple/coreml/runtime/sdk/ETCoreMLModelProfiler.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ typedef NSDictionary<ETCoreMLModelStructurePath*, ETCoreMLOperationProfilingInfo
2121

2222
NS_ASSUME_NONNULL_BEGIN
2323
/// A class responsible for profiling a model.
24-
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelProfiler : NSObject
24+
__attribute__((objc_subclassing_restricted))
25+
@interface ETCoreMLModelProfiler : NSObject
2526

2627
- (instancetype)init NS_UNAVAILABLE;
2728

backends/apple/coreml/runtime/sdk/ETCoreMLModelStructurePath.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
1717
///
1818
/// The class is a thin wrapper over `executorchcoreml::modelstructure::path`.
1919
///
20-
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLModelStructurePath : NSObject<NSCopying>
20+
__attribute__((objc_subclassing_restricted))
21+
@interface ETCoreMLModelStructurePath : NSObject<NSCopying>
2122

2223
- (instancetype)init NS_UNAVAILABLE;
2324

backends/apple/coreml/runtime/sdk/ETCoreMLOperationProfilingInfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
NS_ASSUME_NONNULL_BEGIN
1313

1414
/// A class representing the profiling info of an operation.
15-
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLOperationProfilingInfo : NSObject<NSCopying>
15+
__attribute__((objc_subclassing_restricted))
16+
@interface ETCoreMLOperationProfilingInfo : NSObject<NSCopying>
1617

1718
- (instancetype)init NS_UNAVAILABLE;
1819

backends/apple/coreml/runtime/sdk/ETCoreMLPair.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
NS_ASSUME_NONNULL_BEGIN
1111
/// A class representing a pair with first and second objects.
12-
__attribute__((objc_subclassing_restricted)) @interface ETCoreMLPair<First, Second> : NSObject<NSCopying>
12+
__attribute__((objc_subclassing_restricted))
13+
@interface ETCoreMLPair<First, Second> : NSObject<NSCopying>
1314

1415
- (instancetype)init NS_UNAVAILABLE;
1516

0 commit comments

Comments
 (0)