-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
96 lines (96 loc) · 3.16 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
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
AccessModifierOffset: -2 #
AlignAfterOpenBracket: Align # DontAlign, AlwaysBreak, Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right #
AlignOperands: Align
AlignTrailingComments: true #
AllowAllArgumentsOnNextLine: false # bool
AllowAllParametersOfDeclarationOnNextLine: false #
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All # All, InLine, Empty, InlineOnly
AllowShortIfStatementsOnASingleLine: WithoutElse # Never, WithoutElse, Always
AllowShortLoopsOnASingleLine: true #
AlwaysBreakAfterDefinitionReturnType: All # None, All, TopLevel
AlwaysBreakAfterReturnType: AllDefinitions # None, All, TopLevel, TopLevelDefinitions, AllDefinitions
AlwaysBreakBeforeMultilineStrings: true #
AlwaysBreakTemplateDeclarations: Yes #
BasedOnStyle: LLVM
BinPackArguments: true #
BinPackParameters: false #
BreakBeforeBinaryOperators: None # None, NonAssignment, All
BreakBeforeBraces: Custom # Attach, Linux, Allman, GNU, Custom, Stroustrup
BreakBeforeInheritanceComma: true
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon # BeforeColon, AfterColon, BeforeComma
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ TODO:'
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true #
ConstructorInitializerIndentWidth: 2 #
ContinuationIndentWidth: 2 #
Cpp11BracedListStyle: true #
DerivePointerAlignment: false #
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: [ 'RANGES_FOR', 'FOREACH' ]
IncludeBlocks: Regroup
IndentCaseLabels: true #
IndentPPDirectives: AfterHash # None, AfterHash
IndentWidth: 2 #
IndentWrappedFunctionNames: false #
KeepEmptyLinesAtTheStartOfBlocks: true
Language: Cpp #
MaxEmptyLinesToKeep: 1 #
NamespaceIndentation: Inner # Inner, None, All
ObjCSpaceAfterProperty: true #
ObjCSpaceBeforeProtocolList: true #
PenaltyBreakAssignment: 500
PenaltyBreakBeforeFirstCallParameter: 0 #
PenaltyBreakComment: 0 #
PenaltyBreakFirstLessLess: 0 #
PenaltyBreakString: 100 #
PenaltyExcessCharacter: 100 #
PenaltyReturnTypeOnItsOwnLine: 0 #
PointerAlignment: Right #
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true #
SpaceBeforeParens: ControlStatements # Never, Always, ControlStatements
SpaceInEmptyParentheses: false #
SpacesBeforeTrailingComments: 2 #
SpacesInAngles: false #
SpacesInContainerLiterals: false #
SpacesInCStyleCastParentheses: false #
SpacesInParentheses: false #
SpacesInSquareBrackets: false
Standard: c++17 # c++17, Auto
TabWidth: 4 #
UseTab: Never #
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
BraceWrapping:
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false