1 # SPDX-License-Identifier: GPL-2.0
3 # clang-format configuration file. Intended for clang-format >= 16.
5 # For more information, see:
7 # https://clang.llvm.org/docs/ClangFormat.html
8 # https://clang.llvm.org/docs/ClangFormatStyleOptions.html
9 # https://clang-format-configurator.site/
14 AccessModifierOffset: -4
15 AlignAfterOpenBracket: Align
16 AlignArrayOfStructures: Left
17 AlignConsecutiveAssignments:
19 AcrossEmptyLines: false
23 AlignConsecutiveBitFields:
25 AcrossEmptyLines: false
29 AlignConsecutiveDeclarations:
31 AcrossEmptyLines: false
35 AlignConsecutiveMacros:
37 AcrossEmptyLines: false
41 AlignEscapedNewlines: Left
43 AlignTrailingComments:
46 AllowAllArgumentsOnNextLine: true
47 AllowAllParametersOfDeclarationOnNextLine: false
48 AllowShortBlocksOnASingleLine: Never
49 AllowShortCaseLabelsOnASingleLine: false
50 AllowShortEnumsOnASingleLine: true
51 AllowShortFunctionsOnASingleLine: None
52 AllowShortIfStatementsOnASingleLine: Never
53 AllowShortLambdasOnASingleLine: All
54 AllowShortLoopsOnASingleLine: false
55 AlwaysBreakAfterDefinitionReturnType: None
56 AlwaysBreakAfterReturnType: None
57 AlwaysBreakBeforeMultilineStrings: false
58 AlwaysBreakTemplateDeclarations: MultiLine
60 # git grep '^#define [^[:space:]]*__.*[^[:space:]]*__attribute__' | grep -v "vendorcode\|payloads\|util" | sed "s|.*:||;s|^#define \([^[:space:]]*__[^([:space:]]*\).*$| - '\1'|" | LC_ALL=C sort -u
74 BinPackArguments: true
75 BinPackParameters: true
76 BitFieldColonSpacing: Both
80 AfterControlStatement: Never
82 AfterExternBlock: false
85 AfterObjCDeclaration: false
90 BeforeLambdaBody: false
93 SplitEmptyFunction: true
94 SplitEmptyRecord: true
95 SplitEmptyNamespace: true
96 BreakAfterAttributes: Never
97 BreakAfterJavaFieldAnnotations: false
99 BreakBeforeBinaryOperators: None
100 BreakBeforeConceptDeclarations: Always
101 BreakBeforeBraces: Custom
102 BreakBeforeInlineASMColon: OnlyMultiline
103 BreakBeforeTernaryOperators: false
104 BreakConstructorInitializers: AfterColon
105 BreakInheritanceList: AfterColon
106 BreakStringLiterals: false
108 CommentPragmas: '^ IWYU pragma:'
109 CompactNamespaces: false
110 ConstructorInitializerIndentWidth: 8
111 ContinuationIndentWidth: 8
112 Cpp11BracedListStyle: true
113 DerivePointerAlignment: false
115 EmptyLineAfterAccessModifier: Never
116 EmptyLineBeforeAccessModifier: LogicalBlock
117 ExperimentalAutoDetectBinPacking: false
118 FixNamespaceComments: false
120 # git grep '^#define [^[:space:]]*for_each[^[:space:]]*(' | grep -v "vendorcode\|payloads\|util" | sed "s|.*:||;s|^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$| - '\1'|" | LC_ALL=C sort -u
124 # git grep -i '^#define \+if[^[:space:]]*(' | grep -v "vendorcode\|payloads\|util" | sed "s|.*:||;s|^#define \([^[:space:]]*if[^[:space:]]*\)(.*$| - '\1'|I" | grep -v IFIX | LC_ALL=C sort -u
126 - 'IF_CHANNEL_POPULATED'
127 - 'IF_DIMM_POPULATED'
128 - 'IF_RANK_POPULATED'
130 IncludeBlocks: Preserve
131 IncludeIsMainSourceRegex: ''
132 IndentAccessModifiers: false
133 IndentCaseBlocks: false
134 IndentCaseLabels: false
135 IndentExternBlock: AfterExternBlock
136 IndentGotoLabels: false
137 IndentPPDirectives: None
138 IndentRequiresClause: true
140 IndentWrappedFunctionNames: false
142 InsertNewlineAtEOF: true
143 InsertTrailingCommas: None
144 IntegerLiteralSeparator:
151 JavaScriptQuotes: Leave
152 JavaScriptWrapImports: true
153 KeepEmptyLinesAtTheStartOfBlocks: false
154 LambdaBodyIndentation: Signature
158 MaxEmptyLinesToKeep: 1
159 NamespaceIndentation: None
160 ObjCBinPackProtocolList: Auto
161 ObjCBlockIndentWidth: 8
162 ObjCBreakBeforeNestedBlockParam: true
163 ObjCSpaceAfterProperty: true
164 ObjCSpaceBeforeProtocolList: true
165 PackConstructorInitializers: BinPack
166 PenaltyBreakAssignment: 10
167 PenaltyBreakBeforeFirstCallParameter: 30
168 PenaltyBreakComment: 10
169 PenaltyBreakFirstLessLess: 0
170 PenaltyBreakOpenParenthesis: 0
171 PenaltyBreakString: 10
172 PenaltyBreakTemplateDeclaration: 10
173 PenaltyExcessCharacter: 100
174 PenaltyIndentedWhitespace: 0
175 PenaltyReturnTypeOnItsOwnLine: 60
176 PointerAlignment: Right
178 QualifierAlignment: Left
179 ReferenceAlignment: Pointer
180 ReflowComments: false
181 RemoveBracesLLVM: false
182 RemoveSemicolon: false
183 RequiresClausePosition: OwnLine
184 RequiresExpressionIndentation: OuterScope
185 SeparateDefinitionBlocks: Leave
186 ShortNamespaceLines: 1
188 SortJavaStaticImport: Before
189 SortUsingDeclarations: Never
190 SpaceAfterCStyleCast: false
191 SpaceAfterLogicalNot: false
192 SpaceAfterTemplateKeyword: true
193 SpaceAroundPointerQualifiers: Default
194 SpaceBeforeAssignmentOperators: true
195 SpaceBeforeCaseColon: false
196 SpaceBeforeCpp11BracedList: false
197 SpaceBeforeCtorInitializerColon: true
198 SpaceBeforeInheritanceColon: true
199 SpaceBeforeParens: ControlStatementsExceptControlMacros
200 SpaceBeforeParensOptions:
201 AfterControlStatements: true
202 AfterForeachMacros: false
203 AfterFunctionDefinitionName: false
204 AfterFunctionDeclarationName: false
206 AfterOverloadedOperator: false
207 AfterRequiresInClause: false
208 AfterRequiresInExpression: false
209 BeforeNonEmptyParentheses: false
210 SpaceBeforeRangeBasedForLoopColon: true
211 SpaceBeforeSquareBrackets: false
212 SpaceInEmptyBlock: false
213 SpaceInEmptyParentheses: false
214 SpacesBeforeTrailingComments: 1
215 SpacesInAngles: Never
216 SpacesInConditionalStatement: false
217 SpacesInContainerLiterals: false
218 SpacesInCStyleCastParentheses: false
219 SpacesInLineCommentPrefix:
222 SpacesInParentheses: false
223 SpacesInSquareBrackets: false
226 UseTab: ForContinuationAndIndentation