|
| 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 | +AccessModifierOffset: -4 |
| 5 | +AlignAfterOpenBracket: DontAlign |
| 6 | +AlignConsecutiveAssignments: false |
| 7 | +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 |
| 12 | +AlignOperands: true |
| 13 | +AlignTrailingComments: false |
| 14 | +AllowAllParametersOfDeclarationOnNextLine: true |
| 15 | +AllowShortBlocksOnASingleLine: true |
| 16 | +AllowShortCaseLabelsOnASingleLine: false |
| 17 | +AllowShortFunctionsOnASingleLine: Empty # pb with 3.5 |
| 18 | +AllowShortIfStatementsOnASingleLine: false |
| 19 | +AllowShortLoopsOnASingleLine: false |
| 20 | +#AlwaysBreakAfterDefinitionReturnType (not set because deprecated [BC]) |
| 21 | +AlwaysBreakAfterReturnType: None |
| 22 | +AlwaysBreakBeforeMultilineStrings: false |
| 23 | +AlwaysBreakTemplateDeclarations: true |
| 24 | +BinPackArguments: true |
| 25 | +BinPackParameters: false |
| 26 | +BraceWrapping: |
| 27 | + AfterClass: true |
| 28 | + AfterControlStatement: true |
| 29 | + AfterEnum: true |
| 30 | + AfterFunction: true |
| 31 | + AfterNamespace: true |
| 32 | + AfterObjCDeclaration: true |
| 33 | + AfterStruct: true |
| 34 | + AfterUnion: true |
| 35 | + BeforeCatch: true |
| 36 | + BeforeElse: true |
| 37 | + 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) |
| 42 | +BreakBeforeTernaryOperators: true |
| 43 | +# For newer clang version, consider the new macro: |
| 44 | +# BreakConstructorInitializers |
| 45 | +BreakConstructorInitializersBeforeComma: false |
| 46 | +#BreakStringLiterals |
| 47 | +ColumnLimit: 80 |
| 48 | +CommentPragmas: '' |
| 49 | +#CompactNamespaces: false (this option is in newer clang version) |
| 50 | +ConstructorInitializerAllOnOneLineOrOnePerLine: true |
| 51 | +ConstructorInitializerIndentWidth: 4 |
| 52 | +ContinuationIndentWidth: 4 |
| 53 | +Cpp11BracedListStyle: false |
| 54 | +DerivePointerAlignment: true |
| 55 | +DisableFormat: false |
| 56 | +#ExperimentalAutoDetectBinPacking (Not defined since the documentation to not use it) |
| 57 | +#FixNamespaceComments: false (this option needs a newer clang version) |
| 58 | +#ForEachMacros: TODO |
| 59 | +#IncludeCategories: TODO |
| 60 | +#IncludeIsMainRegex (this option needs a newer clang version) |
| 61 | +IndentCaseLabels: false |
| 62 | +IndentWidth: 4 |
| 63 | +IndentWrappedFunctionNames: true |
| 64 | +KeepEmptyLinesAtTheStartOfBlocks: false |
| 65 | +Language: Cpp |
| 66 | +#MacroBlockBegin TODO |
| 67 | +#MacroBlockEnd TODO |
| 68 | +MaxEmptyLinesToKeep: 1 |
| 69 | +NamespaceIndentation: All |
| 70 | +#PenaltyBreakBeforeFirstCallParameter TODO |
| 71 | +#PenaltyBreakComment TODO |
| 72 | +#PenaltyBreakFirstLessLess TODO |
| 73 | +#PenaltyBreakString TODO |
| 74 | +#PenaltyExcessCharacter TODO |
| 75 | +#PenaltyReturnTypeOnItsOwnLine TODO |
| 76 | +PointerAlignment: Left |
| 77 | +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) |
| 80 | +SpaceAfterCStyleCast: true |
| 81 | +#SpaceAfterTemplateKeyword: false (this option needs a newer clang version) |
| 82 | +SpaceBeforeAssignmentOperators: true |
| 83 | +SpaceBeforeParens: Never |
| 84 | +SpaceInEmptyParentheses: false |
| 85 | +SpacesBeforeTrailingComments: 1 |
| 86 | +SpacesInAngles: true |
| 87 | +SpacesInCStyleCastParentheses: false |
| 88 | +SpacesInContainerLiterals: false |
| 89 | +SpacesInParentheses: true |
| 90 | +SpacesInSquareBrackets: false |
| 91 | +Standard: Cpp11 |
| 92 | +TabWidth: 4 |
| 93 | +UseTab: Never |
0 commit comments