Skip to content

Commit 057e432

Browse files
mergennachinfacebook-github-bot
authored andcommitted
Update to clang 18.1.3
Reviewed By: zertosh Differential Revision: D56139356 fbshipit-source-id: a740606db6e308ed133caa3f0756c2a53d7dce7b
1 parent 57dd7f1 commit 057e432

File tree

3 files changed

+119
-39
lines changed

3 files changed

+119
-39
lines changed

.clang-format

Lines changed: 116 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,55 @@
22
Language: Cpp
33
AccessModifierOffset: -1
44
AlignAfterOpenBracket: AlwaysBreak
5-
AlignConsecutiveMacros: None
6-
AlignConsecutiveAssignments: None
7-
AlignConsecutiveBitFields: None
8-
AlignConsecutiveDeclarations: None
5+
AlignArrayOfStructures: None
6+
AlignConsecutiveAssignments:
7+
Enabled: false
8+
AcrossEmptyLines: false
9+
AcrossComments: false
10+
AlignCompound: false
11+
AlignFunctionPointers: false
12+
PadOperators: true
13+
AlignConsecutiveBitFields:
14+
Enabled: false
15+
AcrossEmptyLines: false
16+
AcrossComments: false
17+
AlignCompound: false
18+
AlignFunctionPointers: false
19+
PadOperators: true
20+
AlignConsecutiveDeclarations:
21+
Enabled: false
22+
AcrossEmptyLines: false
23+
AcrossComments: false
24+
AlignCompound: false
25+
AlignFunctionPointers: false
26+
PadOperators: true
27+
AlignConsecutiveMacros:
28+
Enabled: false
29+
AcrossEmptyLines: false
30+
AcrossComments: false
31+
AlignCompound: false
32+
AlignFunctionPointers: false
33+
PadOperators: true
34+
AlignConsecutiveShortCaseStatements:
35+
Enabled: false
36+
AcrossEmptyLines: false
37+
AcrossComments: false
38+
AlignCaseColons: false
939
AlignEscapedNewlines: Left
1040
AlignOperands: DontAlign
11-
AlignTrailingComments: false
41+
AlignTrailingComments:
42+
Kind: Never
43+
OverEmptyLines: 0
1244
AllowAllArgumentsOnNextLine: true
13-
AllowAllConstructorInitializersOnNextLine: true
1445
AllowAllParametersOfDeclarationOnNextLine: false
15-
AllowShortEnumsOnASingleLine: true
46+
AllowBreakBeforeNoexceptSpecifier: Never
1647
AllowShortBlocksOnASingleLine: Never
1748
AllowShortCaseLabelsOnASingleLine: false
49+
AllowShortCompoundRequirementOnASingleLine: true
50+
AllowShortEnumsOnASingleLine: true
1851
AllowShortFunctionsOnASingleLine: Empty
19-
AllowShortLambdasOnASingleLine: All
2052
AllowShortIfStatementsOnASingleLine: Never
53+
AllowShortLambdasOnASingleLine: All
2154
AllowShortLoopsOnASingleLine: false
2255
AlwaysBreakAfterDefinitionReturnType: None
2356
AlwaysBreakAfterReturnType: None
@@ -27,17 +60,18 @@ AttributeMacros:
2760
- __capability
2861
BinPackArguments: false
2962
BinPackParameters: false
63+
BitFieldColonSpacing: Both
3064
BraceWrapping:
3165
AfterCaseLabel: false
3266
AfterClass: false
3367
AfterControlStatement: Never
3468
AfterEnum: false
69+
AfterExternBlock: false
3570
AfterFunction: false
3671
AfterNamespace: false
3772
AfterObjCDeclaration: false
3873
AfterStruct: false
3974
AfterUnion: false
40-
AfterExternBlock: false
4175
BeforeCatch: false
4276
BeforeElse: false
4377
BeforeLambdaBody: false
@@ -46,35 +80,36 @@ BraceWrapping:
4680
SplitEmptyFunction: true
4781
SplitEmptyRecord: true
4882
SplitEmptyNamespace: true
83+
BreakAdjacentStringLiterals: true
84+
BreakAfterAttributes: Leave
85+
BreakAfterJavaFieldAnnotations: false
86+
BreakArrays: true
4987
BreakBeforeBinaryOperators: None
50-
BreakBeforeConceptDeclarations: true
88+
BreakBeforeConceptDeclarations: Always
5189
BreakBeforeBraces: Attach
52-
BreakBeforeInheritanceComma: false
53-
BreakInheritanceList: BeforeColon
90+
BreakBeforeInlineASMColon: OnlyMultiline
5491
BreakBeforeTernaryOperators: true
55-
BreakConstructorInitializersBeforeComma: false
5692
BreakConstructorInitializers: BeforeColon
57-
BreakAfterJavaFieldAnnotations: false
93+
BreakInheritanceList: BeforeColon
5894
BreakStringLiterals: false
5995
ColumnLimit: 80
6096
CommentPragmas: '^ IWYU pragma:'
6197
CompactNamespaces: false
62-
ConstructorInitializerAllOnOneLineOrOnePerLine: true
6398
ConstructorInitializerIndentWidth: 4
6499
ContinuationIndentWidth: 4
65100
Cpp11BracedListStyle: true
66-
DeriveLineEnding: true
67101
DerivePointerAlignment: false
68102
DisableFormat: false
103+
EmptyLineAfterAccessModifier: Never
69104
EmptyLineBeforeAccessModifier: LogicalBlock
70105
ExperimentalAutoDetectBinPacking: false
71106
FixNamespaceComments: true
72107
ForEachMacros:
73108
- FOR_EACH
74109
- FOR_EACH_R
75110
- FOR_EACH_RANGE
76-
StatementAttributeLikeMacros:
77-
- Q_EMIT
111+
IfMacros:
112+
- KJ_IF_MAYBE
78113
IncludeBlocks: Preserve
79114
IncludeCategories:
80115
- Regex: '^<.*\.h(pp)?>'
@@ -91,18 +126,31 @@ IncludeCategories:
91126
CaseSensitive: false
92127
IncludeIsMainRegex: '(Test)?$'
93128
IncludeIsMainSourceRegex: ''
94-
IndentCaseLabels: true
129+
IndentAccessModifiers: false
95130
IndentCaseBlocks: false
131+
IndentCaseLabels: true
132+
IndentExternBlock: AfterExternBlock
96133
IndentGotoLabels: true
97134
IndentPPDirectives: None
98-
IndentExternBlock: AfterExternBlock
99-
IndentRequires: false
135+
IndentRequiresClause: true
100136
IndentWidth: 2
101137
IndentWrappedFunctionNames: false
138+
InsertBraces: false
139+
InsertNewlineAtEOF: false
102140
InsertTrailingCommas: None
141+
IntegerLiteralSeparator:
142+
Binary: 0
143+
BinaryMinDigits: 0
144+
Decimal: 0
145+
DecimalMinDigits: 0
146+
Hex: 0
147+
HexMinDigits: 0
103148
JavaScriptQuotes: Leave
104149
JavaScriptWrapImports: true
105150
KeepEmptyLinesAtTheStartOfBlocks: false
151+
KeepEmptyLinesAtEOF: false
152+
LambdaBodyIndentation: Signature
153+
LineEnding: DeriveLF
106154
MacroBlockBegin: ''
107155
MacroBlockEnd: ''
108156
MaxEmptyLinesToKeep: 1
@@ -112,53 +160,85 @@ ObjCBlockIndentWidth: 2
112160
ObjCBreakBeforeNestedBlockParam: true
113161
ObjCSpaceAfterProperty: false
114162
ObjCSpaceBeforeProtocolList: false
163+
PackConstructorInitializers: NextLine
115164
PenaltyBreakAssignment: 2
116165
PenaltyBreakBeforeFirstCallParameter: 1
117166
PenaltyBreakComment: 300
118167
PenaltyBreakFirstLessLess: 120
168+
PenaltyBreakOpenParenthesis: 0
169+
PenaltyBreakScopeResolution: 500
119170
PenaltyBreakString: 1000
120171
PenaltyBreakTemplateDeclaration: 10
121172
PenaltyExcessCharacter: 1000000
122-
PenaltyReturnTypeOnItsOwnLine: 200
123173
PenaltyIndentedWhitespace: 0
174+
PenaltyReturnTypeOnItsOwnLine: 200
124175
PointerAlignment: Left
176+
PPIndentWidth: -1
177+
QualifierAlignment: Leave
178+
ReferenceAlignment: Pointer
125179
ReflowComments: true
126-
SortIncludes: true
180+
RemoveBracesLLVM: false
181+
RemoveParentheses: Leave
182+
RemoveSemicolon: false
183+
RequiresClausePosition: OwnLine
184+
RequiresExpressionIndentation: OuterScope
185+
SeparateDefinitionBlocks: Leave
186+
ShortNamespaceLines: 1
187+
SkipMacroDefinitionBody: false
188+
SortIncludes: CaseSensitive
127189
SortJavaStaticImport: Before
128-
SortUsingDeclarations: true
190+
SortUsingDeclarations: LexicographicNumeric
129191
SpaceAfterCStyleCast: false
130192
SpaceAfterLogicalNot: false
131193
SpaceAfterTemplateKeyword: true
194+
SpaceAroundPointerQualifiers: Default
132195
SpaceBeforeAssignmentOperators: true
133196
SpaceBeforeCaseColon: false
134197
SpaceBeforeCpp11BracedList: false
135198
SpaceBeforeCtorInitializerColon: true
136199
SpaceBeforeInheritanceColon: true
200+
SpaceBeforeJsonColon: false
137201
SpaceBeforeParens: ControlStatements
138-
SpaceAroundPointerQualifiers: Default
202+
SpaceBeforeParensOptions:
203+
AfterControlStatements: true
204+
AfterForeachMacros: true
205+
AfterFunctionDefinitionName: false
206+
AfterFunctionDeclarationName: false
207+
AfterIfMacros: true
208+
AfterOverloadedOperator: false
209+
AfterPlacementOperator: true
210+
AfterRequiresInClause: false
211+
AfterRequiresInExpression: false
212+
BeforeNonEmptyParentheses: false
139213
SpaceBeforeRangeBasedForLoopColon: true
214+
SpaceBeforeSquareBrackets: false
140215
SpaceInEmptyBlock: false
141-
SpaceInEmptyParentheses: false
142216
SpacesBeforeTrailingComments: 1
143-
SpacesInAngles: false
144-
SpacesInConditionalStatement: false
217+
SpacesInAngles: Never
145218
SpacesInContainerLiterals: true
146-
SpacesInCStyleCastParentheses: false
147-
SpacesInParentheses: false
219+
SpacesInLineCommentPrefix:
220+
Minimum: 1
221+
Maximum: -1
222+
SpacesInParens: Never
223+
SpacesInParensOptions:
224+
InCStyleCasts: false
225+
InConditionalStatements: false
226+
InEmptyParentheses: false
227+
Other: false
148228
SpacesInSquareBrackets: false
149-
SpaceBeforeSquareBrackets: false
150-
BitFieldColonSpacing: Both
151229
Standard: Latest
230+
StatementAttributeLikeMacros:
231+
- Q_EMIT
152232
StatementMacros:
153233
- Q_UNUSED
154234
- QT_REQUIRE_VERSION
155235
TabWidth: 8
156-
UseCRLF: false
157236
UseTab: Never
237+
VerilogBreakBetweenInstancePorts: true
158238
WhitespaceSensitiveMacros:
159-
- STRINGIZE
160-
- PP_STRINGIZE
161239
- BOOST_PP_STRINGIZE
162-
- NS_SWIFT_NAME
163240
- CF_SWIFT_NAME
241+
- NS_SWIFT_NAME
242+
- PP_STRINGIZE
243+
- STRINGIZE
164244
...

examples/arm/executor_runner/arm_executor_runner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ using namespace std;
3131
using torch::executor::Error;
3232
using torch::executor::Result;
3333

34-
__attribute__((section(".sram.data"), aligned(16)))
35-
uint8_t method_allocator_pool[4 * 1024U];
34+
__attribute__((section(".sram.data"), aligned(16))) uint8_t
35+
method_allocator_pool[4 * 1024U];
3636

3737
void et_pal_init(void) {}
3838

requirements-lintrunner.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ ufmt==2.5.1
1818
usort==1.0.5
1919

2020
# Other linters
21-
clang-format==12.0.1
21+
clang-format==18.1.3
2222
cmakelint==1.4.1

0 commit comments

Comments
 (0)