-
Notifications
You must be signed in to change notification settings - Fork 19
/
.clang-format
142 lines (140 loc) · 5.22 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# (C) 2016, 2018, 2020 FrankHB.
# See http://clang.llvm.org/docs/ClangFormatStyleOptions.html.
# NOTE: http://clangformat.com/ may be outdated.
# BasedOnStyle: None
Language: Cpp
Standard: Auto # Cpp11 is preferred in general.
AccessModifierOffset: -4
# AlignAfterOpenBracket: false
AlignAfterOpenBracket: DontAlign # Requires Clang 3.8.
AlignConsecutiveAssignments: false
# AlignConsecutiveBitFields: false Requires git b99bf0e08be4.
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false # Requires r364938.
# AlignEscapedNewlinesLeft: false
AlignEscapedNewlines: DontAlign
AlignOperands: false # See https://reviews.llvm.org/rG47ef09e4848a970c530928496b54085cfdba5a76.
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true # Requires r356834.
AllowAllConstructorInitializersOnNextLine: true # Requires r356834.
AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortBlocksOnASingleLine: false # Requires r208765, before r365839.
AllowShortBlocksOnASingleLine: Never # Requires r365839.
AllowShortCaseLabelsOnASingleLine: false
# AllowShortEnumsOnASingleLine: false # Requires git 292058a5d6d7.
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: Empty # Requires r357027.
AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: All # Deprecated.
AlwaysBreakAfterReturnType: All # Requires r240959.
AlwaysBreakBeforeMultilineStrings: false
# AlwaysBreakTemplateDeclarations: true # Requires before r332436.
AlwaysBreakTemplateDeclarations: Yes # Requires r332436.
BinPackArguments: true
BinPackParameters: true
# BitFieldColonSpacing: Both # Requires git 52ab7aa0ba5a.
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterExternBlock: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
# BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon # Requires r303739.
# BreakConstructorInitializersBeforeComma: false # Requires before r303739.
BreakInheritanceList: BeforeColon # Requires r334408.
BreakStringLiterals: false # Requires r259352. Documentatations come later,
# e.g. git 23b78364150c.
ColumnLimit: 80
CommentPragmas: ''
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
# DeriveLineEnding: false # Requires git 358eaa3dcea1.
DerivePointerAlignment: false
DisableFormat: false
# ExperimentalAutoDetectBinPacking: true # Warning: This is an experimental
# flag, that might go away or be renamed.
ForEachMacros: [ 'BOOST_FOREACH' ]
FixNamespaceComments: false # Requires r296632. Note that it still need some
# manual adjustments.
# IncludeBlocks: # Unused.
# IncludeCategories: # Unused.
# IncludeIsMainRegex: '$' # Requires git 266825620c7f.
# IncludeIsMainSourceRegex: # Unused.
# IndentCaseBlocks: true # Requires git 14c044756e77.
IndentCaseLabels: false
# IndentExternBlock: NoIndent # Requires git 6ef45b0426a8.
IndentGotoLabels: false # Requires r371719.
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
# InsertTrailingCommas: # Unused.
# JavaImportGroups: # Unused.
# JavaScriptQuotes: Leave # Unused.
# JavaScriptWrapImports: true # Unused.
KeepEmptyLinesAtTheStartOfBlocks: true # This also seems to apply to namespaces.
# MacroBlockBegin: '^\t*(Decl|Def|Impl|PDefH|Try|YInterface|YB_LibDefect_CMath_builtin)'
MacroBlockBegin: '^\t*YInterface'
MacroBlockEnd: '^\t*EndDecl'
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
# ObjCBinPackProtocolList: Auto # Unused.
ObjCBlockIndentWidth: 4
# ObjCBreakBeforeNestedBlockParam: # Unused.
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 80
PenaltyBreakBeforeFirstCallParameter: 80
PenaltyBreakComment: 40
PenaltyBreakFirstLessLess: 2
PenaltyBreakString: 160
PenaltyBreakTemplateDeclaration: 0 # Requires r332436.
PenaltyExcessCharacter: 320
PenaltyReturnTypeOnItsOwnLine: 0
PointerAlignment: Left
# RawStringFormats: # Unused temporarily.
ReflowComments: false
SortIncludes: false
# SortJavaStaticImport: false # Unused.
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false # Requires r278121.
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeInheritanceColon: true # Requires r326426.
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: false # Requires r326426.
# SpaceBeforeSquareBrackets: false # Requires git a4a7c1259e8a.
SpaceInEmptyBlock: false # Requires r368507.
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# StatementMacros: # Unused.
TabWidth: 4
# TypenameMacros: # Unused.
# UseCRLF: true # Requires git 358eaa3dcea1.
UseTab: Always
# WhitespaceSensitiveMacros:
# ['YPP_Concat', 'YPP_Join', 'YPP_Stringify', 'YPP_Stringize']
# Requires git 0c332a7784c6.