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UOFmtR-YxVI_lg7pPZsupes4mm-FivloHP5aPG1d_zFnOHtVjuFb30eLJnwabxVK96PheBKNy-ObwvEbbevZURyEKEai5wxO42eN0fM5yaARFtZ2F-lWaMLYq4lOzyvJzSO1jSSvqe9G9d49aKJMQF_si4fjZ6bTdVsbTfiLlQekyH5R2RCbZ9jaEI4w7TtOX4nFz4OwPqC7glQiRwfa6467Xue-2kj6-d8O7MI6c3tZzHezcue0O3t5H9x3P8Tpxp5XqEqevE4VL8autVajc2R21_r0FpO-2XbfteE67B__d2ziMHcgxbuTF99vIia1OG-_Br26VnlvGdy3e1yq3GZw_O-0Uwpg4CZGOlxj3zeq2JJEp7le_TNlbVWkLG5iuv7y2tEV9bc7f40p4Ig>53495</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format breaks the code
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
shrek1402
</td>
</tr>
</table>
<pre>
I have:
```
using cross_section_type = STD array<size_t, 4>;
static STD array<cross_section_type, 3> cross_sections = {
{
{0, 1, 5, 3}, // Сечение по оси X
{0, 2, 5, 4}, // Сечение по оси Y
{1, 2, 3, 4} // Сечение по оси Z
}};
```
And I try apply `clang-format`, and get bad code:
```
using cross_section_type = STD array<size_t, 4>;
static STD array<cross_section_type, 3> cross_sections = {
{
{0, 1, 5, 3}, // Сечение по оси X
{0, 2, 5, 4}, // Сечение по оси Y
{1, 2, 3, 4} // Сечение по оси Z}
};
}
```
one character `}` **went into a comment!**
My `.clang-format` file:
```
---
Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: 2
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Right
AlignConsecutiveAssignments: AcrossEmptyLines
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: AcrossEmptyLines
AlignConsecutiveMacros: AcrossEmptyLines
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros: []
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: true
BeforeWhile: false
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: AfterColon
BreakStringLiterals: true
ColumnLimit: 120
CompactNamespaces: true
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: true
ForEachMacros: []
IfMacros: []
IncludeBlocks: Regroup
IndentAccessModifiers: true
IndentCaseBlocks: false
IndentCaseLabels: true
#IndentExternBlock: AfterExternBlock
IndentPPDirectives: BeforeHash
IndentRequires: true
IndentWidth: 2
IndentWrappedFunctionNames: true
InsertTrailingCommas: Wrapped
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
#Language: Cpp
MacroBlockBegin: "LIBCPP_BEGIN_NAMESPACE_HASH"
MacroBlockEnd: "LIBCPP_END_NAMESPACE_HASH"
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
NamespaceMacros: []
#clang14 PackConstructorInitializers: Never
PointerAlignment: Left
#clang14 QualifierAlignment: Left
#clang14 QualifierOrder: ['inline', 'static', 'type', 'const', 'volatile' ]
ReferenceAlignment: Left
ReflowComments: True
ShortNamespaceLines: 10
SortIncludes: CaseInsensitive
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatementsExceptControlMacros
SpaceBeforeRangeBasedForLoopColon: false
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++17
StatementAttributeLikeMacros: [MI, STD, STC, PH, IMPL, MI_CONSTEXPR_20, PMR, CT, DOUBLE_OP, HASH]
StatementMacros: []
TabWidth: 2
TypenameMacros: []
UseCRLF: true
UseTab: Never
WhitespaceSensitiveMacros: []
---
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzlWEtz4jgQ_jXm4krKGBgmBw4YzAw1vBZIzcxeKGHLWBsjMZKchP3125JsYxuTzB6yl00RG6s_tVrqrx9mz8LzYGrH6BlbnaFtOWPLGVqfnOyjH239lwpCD3bAmRA7gQNJGN3J8wnbb_9ZnbG92Y5txDk6W52RIH_jnbTckd21Or7V8bIlSysJiSQJKrOul1UaOqChapHQ61l9r6zPvh7QQ47S0VaXntHWH6u7bbkT-NjW2LGGbXX1eta4bX3u59_hOtbXz2ZEQ72JvvrmwdczzOzP9o9bq7vF6t2PW_1nw-rtYvVOvrr9EWv_WXfEWH0Kr1eJNqShPbUlP9vodErONgiCBNHDXcT4EUmFA1sRoA5Y2nsU2gELFW__N7S9zd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