<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57488>57488</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Why are my function declarations not aligning in header file?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dimitris93
</td>
</tr>
</table>
<pre>
I am trying to align my code as follows, using `clang-format`:
[![enter image description here][1]][1]
But, instead I get the following:
[![enter image description here][2]][2]
Why is this happening? I am using `AlignConsecutiveDeclarations: Consecutive`. Here is my full settings:
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignOperands: AlignAfterOperator
BreakBeforeBinaryOperators: NonAssignment
AllowAllArgumentsOnNextLine: false
PackConstructorInitializers: Never
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: All
AlwaysBreakTemplateDeclarations: MultiLine
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
ColumnLimit: 0
CompactNamespaces: false
#
ContinuationIndentWidth: 8
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
#
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PointerAlignment: Left
ReflowComments: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
# ?
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpaceInEmptyBlock: true
SpacesBeforeTrailingComments: 3
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: ForContinuationAndIndentation
[1]: https://i.stack.imgur.com/TcXX3.png
[2]: https://i.stack.imgur.com/8mG6b.png
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydV1tz2jgU_jXwoimDbSDwwAOQ0jIlIRPopq_CPgY1suSV5KT01--RjC9gk3Z2BszlfOd-k_YyOk1XhCbEqBMTB2IkoZwdBElOJJQREKpJLDmX77rjL0imLagz6oecisOnWKqEGvzZCWad_n2nXzyH847v4ROEAUVYQg9AItChYqlhUpAjKOgM7xHhuY_yW12Ie84zYxUzoQ3QiKzIAQwxRzhbheb8f91-qdu_0v1yPBGmUQ8-jjRNQThFS-JiVUZhZkO1kEJDmBn2BveAcVHUqtFoFqmREN0jX1G1lYvBjTPOiQZjUJS-dqE_6fgB-QICUBhEJFYyIYu1tX7R8Zf4Rh_nKB4TtDUnDpWkQsCcaog2wlGtKev1Pw8lcRaGoPWDjFjMQG3iGNkt6NOggljXZjGGcIPezxUNX3OMI1zCam7OtMY_Eox9IwC3WD4K2gUPGqKoiHRpRWEeMktVea6Avs4BaxPmTFB1KhCO8VGKysaafKwlfMzUIXPGb8Qj_DJrJlzwYsp1ZcwTxsIaaVQWotiVYIZh0_yGswZ4A9WQ_IQuJoD26k1c8_gjPY51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