1
- # clang-format configuration file based on the version 3.8
2
- # releases.llvm.org/3.8.0/tools/clang/docs/ClangFormatStyleOptions.html
3
- # BasedOnStyle (desactivated since we want to control everything [BC])
4
1
AccessModifierOffset : -4
5
2
AlignAfterOpenBracket : DontAlign
6
3
AlignConsecutiveAssignments : false
7
4
AlignConsecutiveDeclarations : false
8
- # If AlignEscapedNewlinesLeft is false, that put as far right as possible,
9
- # else left. In newer clang-format version,
10
- # use AlignEscapedNewlines: Right instead.
11
- AlignEscapedNewlinesLeft : false
5
+ AlignEscapedNewlines : Right
12
6
AlignOperands : true
13
7
AlignTrailingComments : false
8
+ AllowAllArgumentsOnNextLine : true
14
9
AllowAllParametersOfDeclarationOnNextLine : true
15
- AllowShortBlocksOnASingleLine : true
10
+ AllowShortBlocksOnASingleLine : Empty
16
11
AllowShortCaseLabelsOnASingleLine : false
17
- AllowShortFunctionsOnASingleLine : Empty # pb with 3.5
18
- AllowShortIfStatementsOnASingleLine : false
12
+ AllowShortFunctionsOnASingleLine : Empty
13
+ AllowShortIfStatementsOnASingleLine : Never
14
+ AllowShortLambdasOnASingleLine : Empty
19
15
AllowShortLoopsOnASingleLine : false
20
- # AlwaysBreakAfterDefinitionReturnType (not set because deprecated [BC])
21
16
AlwaysBreakAfterReturnType : None
22
17
AlwaysBreakBeforeMultilineStrings : false
23
18
AlwaysBreakTemplateDeclarations : true
@@ -35,30 +30,28 @@ BraceWrapping:
35
30
BeforeCatch : true
36
31
BeforeElse : true
37
32
IndentBraces : false
38
- # SplitEmptyFunctionBody: false (this option provokes a clang-format error [BC])
39
- BreakBeforeBinaryOperators : NonAssignment # pb with 3.5
40
- BreakBeforeBraces : Custom # pb with 3.5
41
- # BreakBeforeInheritanceComma: false (this option needs a newer clang version)
33
+ BreakBeforeBinaryOperators : NonAssignment
34
+ BreakBeforeBraces : Custom
42
35
BreakBeforeTernaryOperators : true
43
- # For newer clang version, consider the new macro:
44
- # BreakConstructorInitializers
45
- BreakConstructorInitializersBeforeComma : false
36
+ BreakConstructorInitializers : BeforeColon
37
+ BreakInheritanceList : BeforeColon
46
38
# BreakStringLiterals
47
39
ColumnLimit : 80
48
40
CommentPragmas : ' '
49
- # CompactNamespaces: false (this option is in newer clang version)
41
+ CompactNamespaces : false
50
42
ConstructorInitializerAllOnOneLineOrOnePerLine : true
51
43
ConstructorInitializerIndentWidth : 4
52
44
ContinuationIndentWidth : 4
53
45
Cpp11BracedListStyle : false
54
46
DerivePointerAlignment : true
55
47
DisableFormat : false
56
48
# ExperimentalAutoDetectBinPacking (Not defined since the documentation to not use it)
57
- # FixNamespaceComments: false (this option needs a newer clang version)
49
+ FixNamespaceComments : true
58
50
# ForEachMacros: TODO
59
51
# IncludeCategories: TODO
60
52
# IncludeIsMainRegex (this option needs a newer clang version)
61
- IndentCaseLabels : false
53
+ IndentCaseLabels : true
54
+ IndentPPDirectives : AfterHash
62
55
IndentWidth : 4
63
56
IndentWrappedFunctionNames : true
64
57
KeepEmptyLinesAtTheStartOfBlocks : false
@@ -75,12 +68,17 @@ NamespaceIndentation: All
75
68
# PenaltyReturnTypeOnItsOwnLine TODO
76
69
PointerAlignment : Left
77
70
ReflowComments : true # TODO check if 3.5 or 3.8
78
- # SortIncludes (this option needs a newer clang version)
79
- # SortUsingDeclarations (this option needs a newer clang version)
71
+ SortIncludes : true
72
+ SortUsingDeclarations : true
80
73
SpaceAfterCStyleCast : true
81
- # SpaceAfterTemplateKeyword: false (this option needs a newer clang version)
74
+ SpaceAfterLogicalNot : false
75
+ SpaceAfterTemplateKeyword : true
82
76
SpaceBeforeAssignmentOperators : true
77
+ SpaceBeforeCpp11BracedList : false
78
+ SpaceBeforeCtorInitializerColon : true
79
+ SpaceBeforeInheritanceColon : true
83
80
SpaceBeforeParens : Never
81
+ SpaceBeforeSquareBrackets : false
84
82
SpaceInEmptyParentheses : false
85
83
SpacesBeforeTrailingComments : 1
86
84
SpacesInAngles : true
0 commit comments