Skip to content

Commit bce8686

Browse files
committed
update clang format
1 parent 6c5ef7a commit bce8686

File tree

1 file changed

+21
-32
lines changed

1 file changed

+21
-32
lines changed

.clang-format

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Language: Cpp
3-
# BasedOnStyle: Microsoft
3+
# BasedOnStyle: LLVM
44
AccessModifierOffset: -2
55
AlignAfterOpenBracket: Align
66
AlignArrayOfStructures: None
@@ -28,11 +28,6 @@ AlignConsecutiveMacros:
2828
AcrossComments: false
2929
AlignCompound: false
3030
PadOperators: false
31-
AlignConsecutiveShortCaseStatements:
32-
Enabled: false
33-
AcrossEmptyLines: false
34-
AcrossComments: false
35-
AlignCaseColons: false
3631
AlignEscapedNewlines: Right
3732
AlignOperands: Align
3833
AlignTrailingComments:
@@ -42,8 +37,8 @@ AllowAllArgumentsOnNextLine: true
4237
AllowAllParametersOfDeclarationOnNextLine: true
4338
AllowShortBlocksOnASingleLine: Never
4439
AllowShortCaseLabelsOnASingleLine: false
45-
AllowShortEnumsOnASingleLine: false
46-
AllowShortFunctionsOnASingleLine: None
40+
AllowShortEnumsOnASingleLine: true
41+
AllowShortFunctionsOnASingleLine: All
4742
AllowShortIfStatementsOnASingleLine: Never
4843
AllowShortLambdasOnASingleLine: All
4944
AllowShortLoopsOnASingleLine: false
@@ -58,17 +53,17 @@ BinPackParameters: true
5853
BitFieldColonSpacing: Both
5954
BraceWrapping:
6055
AfterCaseLabel: false
61-
AfterClass: true
62-
AfterControlStatement: Always
63-
AfterEnum: true
64-
AfterExternBlock: true
65-
AfterFunction: true
66-
AfterNamespace: true
67-
AfterObjCDeclaration: true
68-
AfterStruct: true
56+
AfterClass: false
57+
AfterControlStatement: Never
58+
AfterEnum: false
59+
AfterExternBlock: false
60+
AfterFunction: false
61+
AfterNamespace: false
62+
AfterObjCDeclaration: false
63+
AfterStruct: false
6964
AfterUnion: false
70-
BeforeCatch: true
71-
BeforeElse: true
65+
BeforeCatch: false
66+
BeforeElse: false
7267
BeforeLambdaBody: false
7368
BeforeWhile: false
7469
IndentBraces: false
@@ -80,7 +75,7 @@ BreakAfterJavaFieldAnnotations: false
8075
BreakArrays: true
8176
BreakBeforeBinaryOperators: None
8277
BreakBeforeConceptDeclarations: Always
83-
BreakBeforeBraces: Custom
78+
BreakBeforeBraces: Attach
8479
BreakBeforeInlineASMColon: OnlyMultiline
8580
BreakBeforeTernaryOperators: true
8681
BreakConstructorInitializers: BeforeColon
@@ -142,15 +137,14 @@ IntegerLiteralSeparator:
142137
JavaScriptQuotes: Leave
143138
JavaScriptWrapImports: true
144139
KeepEmptyLinesAtTheStartOfBlocks: true
145-
KeepEmptyLinesAtEOF: false
146140
LambdaBodyIndentation: Signature
147141
LineEnding: DeriveLF
148142
MacroBlockBegin: ''
149143
MacroBlockEnd: ''
150144
MaxEmptyLinesToKeep: 1
151145
NamespaceIndentation: None
152146
ObjCBinPackProtocolList: Auto
153-
ObjCBlockIndentWidth: 2
147+
ObjCBlockIndentWidth: 4
154148
ObjCBreakBeforeNestedBlockParam: true
155149
ObjCSpaceAfterProperty: false
156150
ObjCSpaceBeforeProtocolList: true
@@ -164,14 +158,13 @@ PenaltyBreakString: 1000
164158
PenaltyBreakTemplateDeclaration: 10
165159
PenaltyExcessCharacter: 1000000
166160
PenaltyIndentedWhitespace: 0
167-
PenaltyReturnTypeOnItsOwnLine: 1000
161+
PenaltyReturnTypeOnItsOwnLine: 60
168162
PointerAlignment: Right
169163
PPIndentWidth: -1
170164
QualifierAlignment: Leave
171165
ReferenceAlignment: Pointer
172166
ReflowComments: true
173167
RemoveBracesLLVM: false
174-
RemoveParentheses: Leave
175168
RemoveSemicolon: false
176169
RequiresClausePosition: OwnLine
177170
RequiresExpressionIndentation: OuterScope
@@ -189,7 +182,6 @@ SpaceBeforeCaseColon: false
189182
SpaceBeforeCpp11BracedList: false
190183
SpaceBeforeCtorInitializerColon: true
191184
SpaceBeforeInheritanceColon: true
192-
SpaceBeforeJsonColon: false
193185
SpaceBeforeParens: ControlStatements
194186
SpaceBeforeParensOptions:
195187
AfterControlStatements: true
@@ -204,28 +196,25 @@ SpaceBeforeParensOptions:
204196
SpaceBeforeRangeBasedForLoopColon: true
205197
SpaceBeforeSquareBrackets: false
206198
SpaceInEmptyBlock: false
199+
SpaceInEmptyParentheses: false
207200
SpacesBeforeTrailingComments: 1
208201
SpacesInAngles: Never
202+
SpacesInConditionalStatement: false
209203
SpacesInContainerLiterals: true
204+
SpacesInCStyleCastParentheses: false
210205
SpacesInLineCommentPrefix:
211206
Minimum: 1
212207
Maximum: -1
213-
SpacesInParens: Never
214-
SpacesInParensOptions:
215-
InCStyleCasts: false
216-
InConditionalStatements: false
217-
InEmptyParentheses: false
218-
Other: false
208+
SpacesInParentheses: false
219209
SpacesInSquareBrackets: false
220210
Standard: Latest
221211
StatementAttributeLikeMacros:
222212
- Q_EMIT
223213
StatementMacros:
224214
- Q_UNUSED
225215
- QT_REQUIRE_VERSION
226-
TabWidth: 4
216+
TabWidth: 8
227217
UseTab: Never
228-
VerilogBreakBetweenInstancePorts: true
229218
WhitespaceSensitiveMacros:
230219
- BOOST_PP_STRINGIZE
231220
- CF_SWIFT_NAME

0 commit comments

Comments
 (0)