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

    <tr>
        <th>Summary</th>
        <td>
            clang-format crashes on macro definitions with keyword class
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format,
            crash
      </td>
    </tr>

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

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

<pre>
    clang-format crashes when formatting `clang/test/CodeGenCXX/dllimport.cpp`, which can be reduced to a single line:
```
~$ ls .clang-format
ls: .clang-format: No such file or directory
~$ ./clang-format -version
clang-format version 15.0.0 (https://github.com/llvm/llvm-project 9f616a467fc710f084b7e57812a2ed64c214c2c6)
~$ ./clang-format
#define A class& {}
Assertion failed: (!TheLine->First->isOneOf(tok::kw_class, tok::kw_enum, tok::kw_struct)), function tryFitMultipleLinesInOne, file UnwrappedLineFormatter.cpp, line 488.
...
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU02PmzAQ_TXmYgWBIUAOHLLZTVWp7V5aaW8rY4-Du46NbLNR_n3HsFU3q6pSJSOYec8zbz4YnLz2wnB72ijnzzxS4XkYIdDLCJauvqjtiZKmWHiEHSOEiK-Dk_AJ7OHpCQ1pjD5PzsdcTBNyCTtgCC1GKrilA1APchYgaXSU04ARDVCjLZBqT4p7UuzTpfWsZvtAWE1NoPl7fStoAl77AKDjm6NhxpRKY3DnqdQeRHT-ehMyR7k3JW9ewQft7Mq6gd4QWm7zIi8oYd0Y45SyYxA8Jx3HeciFO6NhzOvv12by7ifmpjvVlA2vm1aJtixU0dVDC9u2KxlnIJtasBIf0RC2-6fIN5BVEhR2je4poiEQ1lDS3pH2fiXsQwAfk2LFsQkydQVFE1Z-H-ELXtyQ6uGofYjpQ4dHC48KCdG9pJqq_cvl-S3wgb53gp3PH30h-lnEpDydA1WzFUvu6K9HHb_OJurJLGnDZ4upFlKazQ978XyaQCbsuC4Z-GV1kJLWgtZdl6815Xn-YUMy2VdyV-14FnU08PcFRh1nLryjS8d0EoZbjfOiL3C9OC_XDmazN_3_DRVNHcIM2KTjtq7qLhv7tmKsK1TXDUoMoATf1g0r6kIUu2ooFc8MH8CEnmzvCGM3k2UsFZ28SXkyt_eZ7lnBWFGVrGT1tmY5_n5DLTsJlVSt4JzUBZxxxnlSljt_yny_iBzmU0DQ6BDDHxAr1ScLsAjA-HyOo_O9u4AVPFvK6ZdafgGKEUmO">