Issue 161331
Summary Closing initializer list on new line
Labels new issue
Assignees
Reporter Redmanacac
    Desired output:
```
   ClassificatorConfig c{
       1,
       "guid",
       "File1",
       {
           {1, "C1"},
           {2, "C2"},
       },
       true,
 QDateTime::currentDateTime(),
       QDateTime::currentDateTime(),
 QDateTime::currentDateTime()
   };
```

Actual output:
```
 ClassificatorConfig c{1,
       "guid",
       "File1",
       {
 {1, "C1"},
           {2, "C2"},
       },
       true,
 QDateTime::currentDateTime(),
       QDateTime::currentDateTime(),
 QDateTime::currentDateTime()};
```
AFAIK there are no options to control this behaviour.

My .clang-format
```
# Format Style Options - Created with Clang Power Tools
---
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortLambdasOnASingleLine: All
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: All
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros: 
  - __capability
BasedOnStyle: Chromium
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
BraceWrapping: 
  AfterCaseLabel: false
  AfterClass: false
  AfterControlStatement: true
  AfterEnum: false
  AfterFunction: false
  AfterNamespace: false
 AfterObjCDeclaration: false
  AfterStruct: false
  AfterUnion: false
 AfterExternBlock: false
  BeforeCatch: false
  BeforeElse: false
 IndentBraces: false
  SplitEmptyFunction: true
  SplitEmptyRecord: true
 SplitEmptyNamespace: true
  BeforeLambdaBody: false
  BeforeWhile: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakInheritanceList: BeforeColon
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth : 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: 
  - foreach
  - Q_FOREACH
  - BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories: 
  - Regex: ^<ext/.*\.h>
    Priority: 2
    SortPriority: 0
    CaseSensitive: false
  - Regex: ^<.*\.h>
    Priority: 1
    SortPriority: 0
 CaseSensitive: false
  - Regex: ^<.*
    Priority: 2
    SortPriority: 0
 CaseSensitive: false
  - Regex: .*
    Priority: 3
    SortPriority: 0
    CaseSensitive: false
IncludeIsMainRegex: ([-_](test|unittest))?$
IncludeIsMainSourceRegex: ''
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 3
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
_javascript_Quotes: Leave
_javascript_WrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
RawStringFormats: 
  - Language: Cpp
 Delimiters:
    - cc
    - CC
    - cpp
    - Cpp
    - CPP
    - c++
 - C++
    CanonicalDelimiter: ""
    BasedOnStyle: google
  - Language: TextProto
    Delimiters:
    - pb
    - PB
    - proto
    - PROTO
    EnclosingFunctions:
    - EqualsProto
    - EquivToProto
    - PARSE_PARTIAL_TEXT_PROTO
    - PARSE_TEST_PROTO
    - PARSE_TEXT_PROTO
 - ParseTextOrDie
    - ParseTextProtoOrDie
    - ParseTestProto
    - ParsePartialTestProto
    CanonicalDelimiter: pb
    BasedOnStyle: google
ReflowComments: true
SortIncludes: true
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
StatementAttributeLikeMacros: 
  - Q_EMIT
StatementMacros: 
  - Q_UNUSED
  - QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
WhitespaceSensitiveMacros: 
  - BOOST_PP_STRINGIZE
  - CF_SWIFT_NAME
  - NS_SWIFT_NAME
  - PP_STRINGIZE
  - STRINGIZE
...
```

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to