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

    <tr>
        <th>Summary</th>
        <td>
            clang-format hang with a macro used in a lambda expression's attributes
        </td>
    </tr>

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

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

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

<pre>
    The following input causes clang-format to hang:
```
void test() {
 auto a = [] MACRO () {};
}
```
with configuration
```
Macros:
    - MACRO=a
```

note that my intention here is to replace MACRO with an `[[attribute]]` instead, which also hangs. Interestingly, when an attribute is placed after the macro, it works fine:
```
void test() {
    auto a = [] MACRO [[attribute]] () {};
}
```
but when the attribute is placed before the macro, the issue remains.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk09vozwQxj-NuYwSGZNAOHBoG0V6D9Ur7e4XGMMA3ho7sodm--1XBtQ_UvZQyQIsxvM8P88MxmgGR9SI46M4njOcefSh-enohYN3mfbdW_NrJOi9tf5m3ADGXWeGFudIEVqLbtj1PkzIwB5GdIMoHoQ8C_kgSrmtZfvqTQdMkYU6CVWDqB7XH4Aze0AQxRlWH_D88PTjf_gUWJ1FsYWn73v5b4ZHaL3rzTAHZOPd3bBnbIOP7yYBAHarnijOePfI-nSeCXhEhukNjGNySQNGCgQmJvpAV4stbe4XP-ggpUlUj8gcjJ6ZxPGcVinBuMiEnVBPcBtNOwLauN5i3MN_jilQZOMG-7aGkEsZ3xMl3UWyA-yZAvBIMCXAFG4Ybj68ROiNo-9XBeDfhbnH881y6ZlXoOT5HpGm3gf6ipQ2JsaZINCExsV91jVFVxc1ZtTklSrkQVVVlY2NzFGhzjtV57rt6ZT3skAq87I7lfqo68w0SqqDPMkqPxzrotq3ZVlp3eljXhfY9locZBKxe2tfp70PQ7ZIN7lURV5nFjXZuEyOUp8HQSiVZik06dxOz0MUB2lN5PiRiQ1bar6MT6r61jQrMMyROjAOECxOukOgP9dAMabWVlX8uLWYzcE2I_N1aWx1EeoyGB5nvW_9JNQl6W6v3TX439SyUJcFJwp12YheG_U3AAD__1EQOrg">