<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58787>58787</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-format crash with `QualifierAlignment: Left` and volatile keyword
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Lorac
      </td>
    </tr>
</table>

<pre>
    ```
clang-format --version
Debian clang-format version 14.0.6-++20221029081924+f28c006a5895-1~exp1~20221029201936.206
```

Just have a file with this one-liner:
```
void Print() volatile const { }
```
Doesn't crash:
```
void Print() const { }
```

It looks like the `volatile` keyword makes clang-format crash

<details>
  <summary>.clang-format</summary>
---
Language:        Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands:   Align
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
  - __capability
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
  AfterCaseLabel:  true
  AfterClass:      true
  AfterControlStatement: Always
  AfterEnum:       true
  AfterFunction:   true
  AfterNamespace:  true
  AfterObjCDeclaration: true
  AfterStruct:     true
  AfterUnion:      true
  AfterExternBlock: true
  BeforeCatch:     true
  BeforeElse:      true
  BeforeLambdaBody: true
  BeforeWhile:     false
  IndentBraces:    false
  SplitEmptyFunction: true
  SplitEmptyRecord: true
  SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Allman
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeComma
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit:     120
CommentPragmas:  '^ IWYU pragma:'
QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat:   false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: Never
BasedOnStyle:    ''
FixNamespaceComments: true
ForEachMacros:
  - foreach
  - Q_FOREACH
  - BOOST_FOREACH
IfMacros:
  - KJ_IF_MAYBE
IncludeBlocks:   Preserve
IncludeCategories:
  - Regex:           'ui_.\*'
    Priority:        1
    SortPriority:    0
    CaseSensitive:   false
  - Regex:           '^("gtest|<gtest)'
    Priority:        2
    SortPriority:    0
    CaseSensitive:   false
  - Regex:           '^(<)'
    Priority:        3
    SortPriority:    0
    CaseSensitive:   false
  - Regex:           '.\*'
    Priority:        4
    SortPriority:    0
    CaseSensitive:   false
IncludeIsMainRegex: '$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires:  false
IndentWidth:     4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd:   ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
PPIndentWidth:   -1
QualifierAlignment: Left
ReferenceAlignment: Pointer
ReflowComments:  true
RemoveBracesLLVM: false
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes:    CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
  AfterControlStatements: true
  AfterForeachMacros: true
  AfterFunctionDefinitionName: false
  AfterFunctionDeclarationName: false
  AfterIfMacros:   true
  AfterOverloadedOperator: false
  BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles:  Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
  Minimum:         1
  Maximum:         -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard:        Latest
StatementAttributeLikeMacros:
  - Q_EMIT
StatementMacros:
  - Q_UNUSED
  - QT_REQUIRE_VERSION
TabWidth:        4
UseCRLF:         false
UseTab:          ForIndentation
WhitespaceSensitiveMacros:
  - STRINGIZE
  - PP_STRINGIZE
  - BOOST_PP_STRINGIZE
  - NS_SWIFT_NAME
  - CF_SWIFT_NAME
...</details>

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9WV9z4jgS_zTkxQVlTELggQcgsOcZAgyQnZp7oYQtQBsjeW05CfvpryXZliybZB7uLpWQRP1zq9X_Wz6w8Dpq9d38231queMgQvTUPrLkgrjTbr_hJCWMKtoTPhBEnQokBzjd-47b6bdb3gS-Pdfzuq43dAfdoXcPC0dvELhuHz0Mhg_tbutxhj9i8asAem532Ot3PLevdrKEUp_fspQ7Z_SGHeQcSYSdd8LPDj-T1GEUtyNCcdLqjRs5vDESOuuEUN7yBi1v6LyxCHHBJGAU2LYeJ_Dz1PjsE8MpbXmP3AkSlJ5_e4uvOatPnzsRY6-pE5FXDOfBDgAK-eBP5xVf31kSOhf0itOq-pVEBrNWbxpijkiUtnozteQ4sJhmlwtKrrDYMRkApeXNNVE90W631R8LQGbohOHMTv41jWNFGwcBTtNnFpIjwcnqeEwxF7j2fU6PyImOjxxoMaaTBAWvCiAJJiZJ0HV13PIkC3iW4FSAlmBSAzMFXeIg4-QNP6MgYV9gxmkKCxdM-RfACeFzgqPwC9gTBqUlYBBYakDO0gDFOFzid-GEErHAR24gQAUJomobp6aBXQIGI_Q0ZZdS5iOK0nKPiL3Dxzg5ZZK-okv8wRewl0CC3izgGmS9YNB8ujoaon_62PbMEj6j2QW4j7cgTIQ_Q04iFrzWoUsMCcHGTlGKF-iAozrePqXEzzMaSFXX4D4VCrbxC3Q5hKiOBoQN9cHNEMe5Fn9H-AVj8Rdyv6NrOkkwepXevsHgxHR3jbHtKSVugiH68HMWcWF2DJ4PzOtWL_E7fIkhHdTc8Bf4msJyYHHIuA6OIvTbzn4PzokOsBO_qtUJoWuIxtKdrI1zsnYimw6hjH8mKI5Bam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