Clang-format: better match code policy example for constructors

AllowAllConstructorInitializersOnNextLine and
ConstructorInitializerAllOnOneLineOrOnePerLine are both deprecated.

PackConstructorInitializers=Never is the most similar setting to
most code and the example in the policy document. E.g. this does not
get reformatted:

    STRINGFORMATTER( int aReserve = 300 ) :
        buffer( aReserve, '\0' )
    {
    }
This commit is contained in:
John Beard 2025-05-18 22:28:33 +08:00
parent 15be27845d
commit 60d18176ef

View File

@ -6,7 +6,6 @@ AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: true AlignConsecutiveDeclarations: true
AlignOperands: true AlignOperands: true
AlignTrailingComments: true AlignTrailingComments: true
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true AllowShortCaseLabelsOnASingleLine: true
@ -25,7 +24,6 @@ BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon BreakConstructorInitializers: AfterColon
BreakStringLiterals: true BreakStringLiterals: true
ColumnLimit: 120 ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8 ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8 ContinuationIndentWidth: 8
Cpp11BracedListStyle: false Cpp11BracedListStyle: false
@ -39,6 +37,7 @@ KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp Language: Cpp
MaxEmptyLinesToKeep: 2 MaxEmptyLinesToKeep: 2
NamespaceIndentation: Inner NamespaceIndentation: Inner
PackConstructorInitializers: Never
PointerAlignment: Left PointerAlignment: Left
ReflowComments: false ReflowComments: false
SortIncludes: false SortIncludes: false