-
Notifications
You must be signed in to change notification settings - Fork 488
Expand file tree
/
Copy path.clang-format
More file actions
88 lines (78 loc) · 2.1 KB
/
.clang-format
File metadata and controls
88 lines (78 loc) · 2.1 KB
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
# Use LLVM style as a base
BasedOnStyle: LLVM
# Indentation settings
IndentWidth: 4
UseTab: Never
TabWidth: 10
# Line length
ColumnLimit: 79
PenaltyExcessCharacter: 2
# Braces placement
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: false
SplitEmptyNamespace: false
MacroBlockBegin: '(STATS_NAME_START|STATS_SECT_START)'
MacroBlockEnd: '(STATS_NAME_END|STATS_SECT_END)'
StatementMacros: ['SLIST_HEAD']
ForEachMacros:
- 'LINK_TABLE_FOREACH'
- 'SLIST_FOREACH'
- 'SLIST_FOREACH_FROM'
- 'SLIST_FOREACH_SAFE'
- 'SLIST_FOREACH_FROM_SAFE'
- 'SLIST_FOREACH_PREVPTR'
- 'STAILQ_FOREACH'
- 'STAILQ_FOREACH_FROM'
- 'STAILQ_FOREACH_SAFE'
- 'STAILQ_FOREACH_FROM_SAFE'
- 'LIST_FOREACH'
- 'LIST_FOREACH_FROM'
- 'LIST_FOREACH_SAFE'
- 'LIST_FOREACH_FROM_SAFE'
- 'TAILQ_FOREACH'
- 'TAILQ_FOREACH_FROM'
- 'TAILQ_FOREACH_SAFE'
- 'TAILQ_FOREACH_FROM_SAFE'
- 'TAILQ_FOREACH_REVERSE'
- 'TAILQ_FOREACH_REVERSE_FROM'
- 'TAILQ_FOREACH_REVERSE_SAFE'
- 'TAILQ_FOREACH_REVERSE_FROM_SAFE'
# Pointer and reference alignment
PointerAlignment: Right
# Function declaration formatting
AllowAllParametersOfDeclarationOnNextLine: false
BinPackParameters: true
BinPackArguments: true
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: true
# Control statements
AlwaysBreakAfterReturnType: TopLevelDefinitions
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
Cpp11BracedListStyle: false
SpacesInParentheses: false
SpaceAfterCStyleCast: false
SpaceBeforeParens: ControlStatementsExceptControlMacros
SpaceInEmptyParentheses: false
BreakStringLiterals: false
AlignArrayOfStructures: Left
SortIncludes: false
DisableFormat: false
InsertNewlineAtEOF: true