From bb31cbe10dc072054a58c5b829bbd6ce595c2f38 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 30 Oct 2022 04:28:45 +0100 Subject: [PATCH] update clang-format config to 14 --- .clang-format | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index 09ac6ea..4e47ffa 100644 --- a/.clang-format +++ b/.clang-format @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: CC0-1.0 -# Written for clang-format 13. -# https://releases.llvm.org/13.0.0/tools/clang/docs/ClangFormatStyleOptions.html +# Written for clang-format 14. +# https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html --- DisableFormat: false Language: Cpp @@ -41,6 +41,7 @@ BreakBeforeBraces: Attach BreakBeforeConceptDeclarations: true BreakBeforeTernaryOperators: true BreakConstructorInitializers: BeforeComma +PackConstructorInitializers: Never # 14 BreakInheritanceList: BeforeComma BreakStringLiterals: true ColumnLimit: 80 @@ -58,7 +59,7 @@ FixNamespaceComments: true # IfMacros: ['IF'] IncludeBlocks: Regroup IncludeCategories: # stdlib headers into own group. - - Regex: '^[^\.]+$' + - Regex: '^[^\.Q]+$' Priority: 4 IndentAccessModifiers: false IndentCaseBlocks: false @@ -66,9 +67,10 @@ IndentCaseLabels: true IndentExternBlock: NoIndent IndentGotoLabels: false IndentPPDirectives: AfterHash -IndentRequires: true # Not sure yet +IndentRequires: true # IndentRequiresClause beginning with 15 IndentWidth: 4 IndentWrappedFunctionNames: false +# InsertBraces: true # 15 InsertTrailingCommas: None KeepEmptyLinesAtTheStartOfBlocks: true LambdaBodyIndentation: Signature @@ -83,17 +85,20 @@ PenaltyBreakBeforeFirstCallParameter: 300 # PenaltyBreakFirstLessLess: 120 # PenaltyBreakString: 1000 # PenaltyBreakTemplateDeclaration: 10 +PenaltyBreakOpenParenthesis: 50 # 14 # PenaltyExcessCharacter: 1000000 # PenaltyIndentedWhitespace: PenaltyReturnTypeOnItsOwnLine: 100 PointerAlignment: Right ReflowComments: true +SeparateDefinitionBlocks: Always # 14 SortIncludes: CaseInsensitive SortUsingDeclarations: true SpaceAfterCStyleCast: false SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: false SpaceAroundPointerQualifiers: Default +QualifierAlignment: Left # 14 SpaceBeforeAssignmentOperators: true SpaceBeforeCaseColon: false SpaceBeforeCpp11BracedList: false