-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
executable file
·92 lines (92 loc) · 3.03 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
# BasedOnStyle: None
Language: Cpp
Standard: Auto # Cpp11 is preferred in general.
AccessModifierOffset: -4
# AlignAfterOpenBracket: true
AlignAfterOpenBracket: DontAlign # Requires Clang > 3.8.
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
# AlignEscapedNewlinesLeft: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: All # Deprecated.
AlwaysBreakAfterReturnType: All # http://reviews.llvm.org/D10774
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
# BreakAfterJavaFieldAnnotations: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
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
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 80
CommentPragmas: ''
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
# ExperimentalAutoDetectBinPacking: true # Warning: This is an experimental flag, that might go away or be renamed.
ForEachMacros: [ 'BOOST_FOREACH' ]
# IncludeCategories: # Unused.
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true # This seems to also apply to namespaces.
#MacroBlockBegin: '^\t*(Decl|Def|Impl|PDefH|Try|YInterface|YB_LibDefect_CMath_builtin)'
MacroBlockBegin: '^\t*YInterface'
MacroBlockEnd: '^\t*EndDecl'
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 80
PenaltyBreakComment: 40
PenaltyBreakFirstLessLess: 2
PenaltyBreakString: 160
PenaltyExcessCharacter: 320
PenaltyReturnTypeOnItsOwnLine: 0
PointerAlignment: Left
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false # Requires > r278121.
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
# turn it off until clang-format 8
StatementMacros: ["YB_Impl_DeclIntTDe", "YB_Impl_DeclIntTDe", "ImplDeclIntTDe", "ImplDeclIntT", "cfn", "fn", "PAIR", "ceCTOR", "eCTOR", "cCTOR"]
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Always