diff --git a/.clang-format b/.clang-format index acefcdd85..112004a90 100644 --- a/.clang-format +++ b/.clang-format @@ -1,14 +1,14 @@ # BasedOnStyle: LLVM AccessModifierOffset: -3 AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false +AlignConsecutiveAssignments: None # This would be nice to have but seems to also (mis)align function parameters -AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: true +AlignConsecutiveDeclarations: None +AlignEscapedNewlines: Left AlignOperands: true AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: true AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false @@ -17,12 +17,12 @@ AllowShortLoopsOnASingleLine: false # AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: true +AlwaysBreakTemplateDeclarations: Yes BinPackArguments: true BinPackParameters: true BraceWrapping: AfterClass: false - AfterControlStatement: false + AfterControlStatement: Never AfterEnum: false AfterFunction: true AfterNamespace: false @@ -32,7 +32,7 @@ BraceWrapping: BeforeCatch: false BeforeElse: false IndentBraces: false -BreakBeforeBinaryOperators: false +BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false @@ -46,19 +46,6 @@ DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -IncludeCategories: - - Regex: '^("|<)T' - Priority: 4 - - Regex: '^("|<)ROOT/' - Priority: 5 - - Regex: '^<.*\.h>' - Priority: 1 - - Regex: '^"(llvm|llvm-c|clang|clang-c)/' - Priority: 2 - - Regex: '^(<|"(gtest|isl|json)/)' - Priority: 3 - - Regex: '.*' - Priority: 6 IndentCaseLabels: false IndentWidth: 3 IndentWrappedFunctionNames: false @@ -77,8 +64,8 @@ PenaltyBreakString: 1000 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 10 PointerAlignment: Right -ReflowComments: true -SortIncludes: false +ReflowComments: true +SortIncludes: Never SpaceAfterCStyleCast: false SpaceBeforeAssignmentOperators: true # You want this : enable it if you have https://reviews.llvm.org/D32525 @@ -91,7 +78,7 @@ SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: Cpp11 +Standard: c++11 TabWidth: 3 UseTab: Never @@ -99,6 +86,8 @@ UseTab: Never IncludeCategories: - Regex: '^"[^/]+\"' Priority: 10 + - Regex: '^("|<)T' + Priority: 12 - Regex: '^"ROOT/' Priority: 15 - Regex: '^"cling/'