diff --git a/.clang-format b/.clang-format index 695c3b53e0..c272ac1220 100644 --- a/.clang-format +++ b/.clang-format @@ -12,6 +12,7 @@ AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: true AllowShortFunctionsOnASingleLine: All AllowShortIfStatementsOnASingleLine: false +AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None @@ -19,24 +20,22 @@ AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: false BinPackArguments: true BinPackParameters: true -BraceWrapping: - AfterClass: false - AfterControlStatement: false - AfterEnum: false +BraceWrapping: + AfterCaseLabel: true + AfterClass: true + AfterControlStatement: Always + AfterEnum: true AfterFunction: true - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - #AfterExternBlock: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false - #SplitEmptyFunction: true - #SplitEmptyRecord: true - #SplitEmptyNamespace: true + AfterNamespace: true + AfterObjCDeclaration: true + AfterStruct: true + AfterUnion: true + AfterExternBlock: true + BeforeCatch: true + BeforeElse: true + BeforeLambdaBody: true BreakBeforeBinaryOperators: All -BreakBeforeBraces: Allman +BreakBeforeBraces: Custom BreakBeforeInheritanceComma: false BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false @@ -65,6 +64,7 @@ IncludeCategories: Priority: 1 IncludeIsMainRegex: '(Test)?$' IndentCaseLabels: true +IndentExternBlock: AfterExternBlock IndentPPDirectives: None IndentWidth: 4 IndentWrappedFunctionNames: false @@ -95,6 +95,6 @@ SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: c++17 +Standard: c++20 TabWidth: 4 UseTab: Never