summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format246
1 files changed, 246 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..cf3c715
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,246 @@
1---
2Language: Cpp
3# BasedOnStyle: LLVM
4AccessModifierOffset: -2
5AlignAfterOpenBracket: Align
6AlignArrayOfStructures: None
7AlignConsecutiveAssignments:
8 Enabled: true
9 AcrossEmptyLines: true
10 AcrossComments: true
11 AlignCompound: true
12 AlignFunctionPointers: false
13 PadOperators: true
14AlignConsecutiveBitFields:
15 Enabled: false
16 AcrossEmptyLines: true
17 AcrossComments: true
18 AlignCompound: false
19 AlignFunctionPointers: false
20 PadOperators: false
21AlignConsecutiveDeclarations:
22 Enabled: true
23 AcrossEmptyLines: true
24 AcrossComments: true
25 AlignCompound: true
26 AlignFunctionPointers: false
27 PadOperators: true
28AlignConsecutiveMacros:
29 Enabled: true
30 AcrossEmptyLines: true
31 AcrossComments: true
32 AlignCompound: true
33 AlignFunctionPointers: false
34 PadOperators: false
35AlignConsecutiveShortCaseStatements:
36 Enabled: true
37 AcrossEmptyLines: true
38 AcrossComments: true
39 AlignCaseColons: false
40AlignEscapedNewlines: Right
41AlignOperands: Align
42AlignTrailingComments:
43 Kind: Always
44 OverEmptyLines: 0
45AllowAllArgumentsOnNextLine: true
46AllowAllParametersOfDeclarationOnNextLine: true
47AllowBreakBeforeNoexceptSpecifier: Never
48AllowShortBlocksOnASingleLine: Never
49AllowShortCaseLabelsOnASingleLine: false
50AllowShortCompoundRequirementOnASingleLine: true
51AllowShortEnumsOnASingleLine: true
52AllowShortFunctionsOnASingleLine: All
53AllowShortIfStatementsOnASingleLine: Never
54AllowShortLambdasOnASingleLine: All
55AllowShortLoopsOnASingleLine: false
56AlwaysBreakAfterDefinitionReturnType: None
57AlwaysBreakAfterReturnType: None
58AlwaysBreakBeforeMultilineStrings: false
59AlwaysBreakTemplateDeclarations: MultiLine
60AttributeMacros:
61 - __capability
62BinPackArguments: true
63BinPackParameters: true
64BitFieldColonSpacing: Both
65BraceWrapping:
66 AfterCaseLabel: false
67 AfterClass: false
68 AfterControlStatement: Never
69 AfterEnum: false
70 AfterExternBlock: false
71 AfterFunction: false
72 AfterNamespace: false
73 AfterObjCDeclaration: false
74 AfterStruct: false
75 AfterUnion: false
76 BeforeCatch: false
77 BeforeElse: false
78 BeforeLambdaBody: false
79 BeforeWhile: false
80 IndentBraces: false
81 SplitEmptyFunction: true
82 SplitEmptyRecord: true
83 SplitEmptyNamespace: true
84BreakAdjacentStringLiterals: true
85BreakAfterAttributes: Leave
86BreakAfterJavaFieldAnnotations: false
87BreakArrays: true
88BreakBeforeBinaryOperators: None
89BreakBeforeConceptDeclarations: Always
90BreakBeforeBraces: Attach
91BreakBeforeInlineASMColon: OnlyMultiline
92BreakBeforeTernaryOperators: true
93BreakConstructorInitializers: BeforeColon
94BreakInheritanceList: BeforeColon
95BreakStringLiterals: false
96ColumnLimit: 160
97CommentPragmas: '^ IWYU pragma:'
98CompactNamespaces: false
99ConstructorInitializerIndentWidth: 4
100ContinuationIndentWidth: 4
101Cpp11BracedListStyle: true
102DerivePointerAlignment: false
103DisableFormat: false
104EmptyLineAfterAccessModifier: Never
105EmptyLineBeforeAccessModifier: LogicalBlock
106ExperimentalAutoDetectBinPacking: false
107FixNamespaceComments: true
108ForEachMacros:
109 - foreach
110 - Q_FOREACH
111 - BOOST_FOREACH
112IfMacros:
113 - KJ_IF_MAYBE
114IncludeBlocks: Preserve
115IncludeCategories:
116 - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
117 Priority: 2
118 SortPriority: 0
119 CaseSensitive: false
120 - Regex: '^(<|"(gtest|gmock|isl|json)/)'
121 Priority: 3
122 SortPriority: 0
123 CaseSensitive: false
124 - Regex: '.*'
125 Priority: 1
126 SortPriority: 0
127 CaseSensitive: false
128IncludeIsMainRegex: '(Test)?$'
129IncludeIsMainSourceRegex: ''
130IndentAccessModifiers: false
131IndentCaseBlocks: false
132IndentCaseLabels: false
133IndentExternBlock: AfterExternBlock
134IndentGotoLabels: true
135IndentPPDirectives: None
136IndentRequiresClause: true
137IndentWidth: 2
138IndentWrappedFunctionNames: false
139InsertBraces: false
140InsertNewlineAtEOF: false
141InsertTrailingCommas: None
142IntegerLiteralSeparator:
143 Binary: 0
144 BinaryMinDigits: 0
145 Decimal: 0
146 DecimalMinDigits: 0
147 Hex: 0
148 HexMinDigits: 0
149JavaScriptQuotes: Leave
150JavaScriptWrapImports: true
151KeepEmptyLinesAtTheStartOfBlocks: true
152KeepEmptyLinesAtEOF: false
153LambdaBodyIndentation: Signature
154LineEnding: DeriveLF
155MacroBlockBegin: ''
156MacroBlockEnd: ''
157MaxEmptyLinesToKeep: 1
158NamespaceIndentation: None
159ObjCBinPackProtocolList: Auto
160ObjCBlockIndentWidth: 2
161ObjCBreakBeforeNestedBlockParam: true
162ObjCSpaceAfterProperty: false
163ObjCSpaceBeforeProtocolList: true
164PackConstructorInitializers: BinPack
165PenaltyBreakAssignment: 2
166PenaltyBreakBeforeFirstCallParameter: 19
167PenaltyBreakComment: 300
168PenaltyBreakFirstLessLess: 120
169PenaltyBreakOpenParenthesis: 0
170PenaltyBreakScopeResolution: 500
171PenaltyBreakString: 1000
172PenaltyBreakTemplateDeclaration: 10
173PenaltyExcessCharacter: 1000000
174PenaltyIndentedWhitespace: 0
175PenaltyReturnTypeOnItsOwnLine: 60
176PointerAlignment: Right
177PPIndentWidth: -1
178QualifierAlignment: Leave
179ReferenceAlignment: Pointer
180ReflowComments: true
181RemoveBracesLLVM: false
182RemoveParentheses: Leave
183RemoveSemicolon: false
184RequiresClausePosition: OwnLine
185RequiresExpressionIndentation: OuterScope
186SeparateDefinitionBlocks: Leave
187ShortNamespaceLines: 1
188SkipMacroDefinitionBody: false
189SortIncludes: CaseSensitive
190SortJavaStaticImport: Before
191SortUsingDeclarations: LexicographicNumeric
192SpaceAfterCStyleCast: false
193SpaceAfterLogicalNot: false
194SpaceAfterTemplateKeyword: true
195SpaceAroundPointerQualifiers: Default
196SpaceBeforeAssignmentOperators: true
197SpaceBeforeCaseColon: false
198SpaceBeforeCpp11BracedList: false
199SpaceBeforeCtorInitializerColon: true
200SpaceBeforeInheritanceColon: true
201SpaceBeforeJsonColon: false
202SpaceBeforeParens: ControlStatements
203SpaceBeforeParensOptions:
204 AfterControlStatements: true
205 AfterForeachMacros: true
206 AfterFunctionDefinitionName: false
207 AfterFunctionDeclarationName: false
208 AfterIfMacros: true
209 AfterOverloadedOperator: false
210 AfterPlacementOperator: true
211 AfterRequiresInClause: false
212 AfterRequiresInExpression: false
213 BeforeNonEmptyParentheses: false
214SpaceBeforeRangeBasedForLoopColon: true
215SpaceBeforeSquareBrackets: false
216SpaceInEmptyBlock: false
217SpacesBeforeTrailingComments: 1
218SpacesInAngles: Never
219SpacesInContainerLiterals: true
220SpacesInLineCommentPrefix:
221 Minimum: 1
222 Maximum: -1
223SpacesInParens: Never
224SpacesInParensOptions:
225 InCStyleCasts: false
226 InConditionalStatements: false
227 InEmptyParentheses: false
228 Other: false
229SpacesInSquareBrackets: false
230Standard: Latest
231StatementAttributeLikeMacros:
232 - Q_EMIT
233StatementMacros:
234 - Q_UNUSED
235 - QT_REQUIRE_VERSION
236TabWidth: 8
237UseTab: Never
238VerilogBreakBetweenInstancePorts: true
239WhitespaceSensitiveMacros:
240 - BOOST_PP_STRINGIZE
241 - CF_SWIFT_NAME
242 - NS_SWIFT_NAME
243 - PP_STRINGIZE
244 - STRINGIZE
245...
246