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])
41AccessModifierOffset : -4
52AlignAfterOpenBracket : DontAlign
63AlignConsecutiveAssignments : false
74AlignConsecutiveDeclarations : 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
126AlignOperands : true
137AlignTrailingComments : false
8+ AllowAllArgumentsOnNextLine : true
149AllowAllParametersOfDeclarationOnNextLine : true
15- AllowShortBlocksOnASingleLine : true
10+ AllowShortBlocksOnASingleLine : Empty
1611AllowShortCaseLabelsOnASingleLine : false
17- AllowShortFunctionsOnASingleLine : Empty # pb with 3.5
18- AllowShortIfStatementsOnASingleLine : false
12+ AllowShortFunctionsOnASingleLine : Empty
13+ AllowShortIfStatementsOnASingleLine : Never
14+ AllowShortLambdasOnASingleLine : Empty
1915AllowShortLoopsOnASingleLine : false
20- # AlwaysBreakAfterDefinitionReturnType (not set because deprecated [BC])
2116AlwaysBreakAfterReturnType : None
2217AlwaysBreakBeforeMultilineStrings : false
2318AlwaysBreakTemplateDeclarations : true
@@ -35,30 +30,28 @@ BraceWrapping:
3530 BeforeCatch : true
3631 BeforeElse : true
3732 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
4235BreakBeforeTernaryOperators : true
43- # For newer clang version, consider the new macro:
44- # BreakConstructorInitializers
45- BreakConstructorInitializersBeforeComma : false
36+ BreakConstructorInitializers : BeforeColon
37+ BreakInheritanceList : BeforeColon
4638# BreakStringLiterals
4739ColumnLimit : 80
4840CommentPragmas : ' '
49- # CompactNamespaces: false (this option is in newer clang version)
41+ CompactNamespaces : false
5042ConstructorInitializerAllOnOneLineOrOnePerLine : true
5143ConstructorInitializerIndentWidth : 4
5244ContinuationIndentWidth : 4
5345Cpp11BracedListStyle : false
5446DerivePointerAlignment : true
5547DisableFormat : false
5648# ExperimentalAutoDetectBinPacking (Not defined since the documentation to not use it)
57- # FixNamespaceComments: false (this option needs a newer clang version)
49+ FixNamespaceComments : true
5850# ForEachMacros: TODO
5951# IncludeCategories: TODO
6052# IncludeIsMainRegex (this option needs a newer clang version)
61- IndentCaseLabels : false
53+ IndentCaseLabels : true
54+ IndentPPDirectives : AfterHash
6255IndentWidth : 4
6356IndentWrappedFunctionNames : true
6457KeepEmptyLinesAtTheStartOfBlocks : false
@@ -75,12 +68,17 @@ NamespaceIndentation: All
7568# PenaltyReturnTypeOnItsOwnLine TODO
7669PointerAlignment : Left
7770ReflowComments : 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
8073SpaceAfterCStyleCast : true
81- # SpaceAfterTemplateKeyword: false (this option needs a newer clang version)
74+ SpaceAfterLogicalNot : false
75+ SpaceAfterTemplateKeyword : true
8276SpaceBeforeAssignmentOperators : true
77+ SpaceBeforeCpp11BracedList : false
78+ SpaceBeforeCtorInitializerColon : true
79+ SpaceBeforeInheritanceColon : true
8380SpaceBeforeParens : Never
81+ SpaceBeforeSquareBrackets : false
8482SpaceInEmptyParentheses : false
8583SpacesBeforeTrailingComments : 1
8684SpacesInAngles : true
0 commit comments