-
Notifications
You must be signed in to change notification settings - Fork 89
/
.clang-format
207 lines (206 loc) · 6.31 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: AcrossComments
AlignConsecutiveAssignments: AcrossComments
AlignConsecutiveBitFields: AcrossComments
AlignConsecutiveDeclarations: AcrossComments
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline #All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: false
#AlwaysBreakAfterDefinitionReturnType: None #depricated
AlwaysBreakAfterReturnType: TopLevelDefinitions
#AlwaysBreakAfterReturnType: AllDefinitions
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true #modified
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: false
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeInheritanceComma: false
BreakInheritanceList: AfterColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
#updated to force the re-sort as specified below in IncludeCategories
IncludeBlocks: Regroup
#sst_config.h always first, so set to negative priority to be above 'main' include (priority 0)
#main header included after - main include assumed to have no suffix
#prioritize all headers in "sst/core" next
#next include other external headers - characterized by headers wrappped with ' " " ' that do NOT have "sst" in the name
#finally include all system headers - characterized as headers wrapped with '< >'
IncludeCategories:
- Regex: '(<.*>)'
Priority: 4
SortPriority: 4
- Regex: '("[^\(sst\)].*")'
Priority: 3
SortPriority: 3
- Regex: '("sst/core/testElements/.*")'
Priority: 1
SortPriority: 1
- Regex: '("sst/core/.*")'
Priority: 2
SortPriority: 2
- Regex: 'sst_config.h'
Priority: -1
IncludeIsMainRegex: ''
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: false
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true #updated to enable Include files to be Re-sorted
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: true
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
- ImplementSerializable
- NotSerializable
TabWidth: 8
UseCRLF: false
UseTab: Never
# Can't get the ELI macros to format properly,
# so we'll just leave them untouched
WhitespaceSensitiveMacros:
- DIAG_DISABLE
- SST_ELI_DECLARE_BASE
- SST_ELI_DECLARE_CTOR_EXTERN
- SST_ELI_DECLARE_DEFAULT_INFO
- SST_ELI_DECLARE_INFO
- SST_ELI_DECLARE_INFO_COMMON
- SST_ELI_DECLARE_INFO_EXTERN
- SST_ELI_DECLARE_NEW_BASE
- SST_ELI_DECLARE_STATISTIC_TEMPLATE
- SST_ELI_DOCUMENT_MODEL_SUPPORTED_EXTENSIONS
- SST_ELI_DOCUMENT_PARAMS
- SST_ELI_DOCUMENT_PORTS
- SST_ELI_DOCUMENT_SIMPLE_INFO
- SST_ELI_DOCUMENT_STATISTICS
- SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS
- SST_ELI_DOCUMENT_ATTRIBUTES
- SST_ELI_INTERFACE_INFO
- SST_ELI_NEW_BASE_CTOR
- SST_ELI_REGISTER_COMPONENT
- SST_ELI_REGISTER_DERIVED
- SST_ELI_REGISTER_MODEL_DESCRIPTION
- SST_ELI_REGISTER_MODULE
- SST_ELI_REGISTER_MODULE_DERIVED
- SST_ELI_REGISTER_PARTITIONER
- SST_ELI_REGISTER_PROFILETOOL_API
- SST_ELI_REGISTER_PROFILETOOL_DERIVED_API
- SST_ELI_REGISTER_PROFILETOOL
- SST_ELI_REGISTER_SUBCOMPONENT_API
- SST_ELI_REGISTER_SUBCOMPONENT
- SST_ELI_REGISTER_SUBCOMPONENT_DERIVED
- SST_ELI_REGISTER_SUBCOMPONENT_DERIVED_API
- SST_ELI_REGISTER_REALTIME_ACTION
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
- SST_SER
- SST_SER_AS_PTR
...