-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.clang-format
90 lines (82 loc) · 2.95 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
# Note: let's keep the options sorted in alphabetical order.
AccessModifierOffset: -4
AlignAfterOpenBracket: true
AlignConsecutiveAssignments: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
# Note: if BinPackArguments is "true", lambdas may be formatted in a bit ugly way, e.g.
# foo(bla, [](OOO)
# {
# },
# [](AAA)
# {
# });
# With "false" the "[](OOO)" part occupies a separate line.
#
# There is a bug report about incorrect formatting of lambdas similar to
# the example above: http://llvm.org/bugs/show_bug.cgi?id=20450
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 120
# A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.
#CommentPragmas:
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [BOOST_FOREACH]
IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
# There is a bug report about empty lines at the beginning of
# namespaces: http://llvm.org/bugs/show_bug.cgi?id=20449
KeepEmptyLinesAtTheStartOfBlocks: true
Language: Cpp
# A regular expression matching macros that start/stop a block.
#MacroBlockBegin
#MacroBlockEnd
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
# Note: these options specify the penalties for certain formatting decisions; for each chunk of code clang-format is
# supposed to try all available combinations and select the one with minimum total penalty.
# Note: it's rather hard to predict the effects that each individual option will have on the code readability in general,
# hence we only use some of the options with big values to effectively disable the corresponding behaviour.
#PenaltyBreakBeforeFirstCallParameter:
#PenaltyBreakComment:
#PenaltyBreakFirstLessLess:
#PenaltyBreakString:
#PenaltyExcessCharacter:
PenaltyReturnTypeOnItsOwnLine: 10000
PointerAlignment: Left
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never