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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] mistaking reference for binary operator in macro with clang-format 19
        </td>
    </tr>

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

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

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

<pre>
    While trying out clang-format on the new 19.x branch, I discovered an issue with the formatting in macros.
It is incorrectly treating the rvalue reference as a binary operator.

In clang-format 18.1.7 with the default LLVM style:
```cpp
#define RVALUE_COPY(CLASS) \
  CLASS(CLASS &&That) : my(std::move(That.my)) {}
```

In clang-format 19.1.0 (https://github.com/llvm/llvm-project/commit/183e8ecc97a996c24e920e7e9668bc65a0d19439)
```cpp
#define RVALUE_COPY(CLASS)                                                     \
 CLASS(CLASS && That) : my(std::move(That.my)) {}
```

I also discovered that a similar thing happens with `*` and `&` as well. I.e.
```cpp
#define PTR_COPY(CLASS) \
  CLASS(CLASS * That) : my(That->my) {}
```
```cpp
#define REF_COPY(CLASS) \
  CLASS(CLASS & That) : my(That.my) {}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVE2P2zYQ_TXUZbACSX3yoINjr4EFXDRI0hQ9FZQ4sthQokFS3vrfF5TcOtkuXOyiggCJ5MzTvNGbJ73XxwmxIcUHUuwSOYfBusaN0n1Dl7RWXZpfB20Qgrvo6Qh2DtAZOR0feutGGcBOEAaECZ-BifRPaJ2cuoHwLTyB0r6zZ3SoQE6gvZ8RnnUYlow1P0RQPcEoO2d9SuiO0M1TAO1BT511DrtgLhAcyiU0ZrqzNDOCwx4dTh2C9CCh1ZN0F7AndDJYd4W6Ak4_Fs3qlKXVrRaFvZxNgMPh60_gw8Ugya6ppKTr3Z1O1x2eKez1hPDp6-bwy-Pv258__kZ4vT1sPn8mXAAptmskwHVvPQPCS8LLL4MMS1i2gfFCeO2Dip_LNqM9I-F1DEjjiVjCqg-k2r0o5i45kbKUAuH1EMLJR2i-J3x_1GGY27SzI-F7Y85_Px5Ozv6BXSB839lx1PGF1RnW2HWikkKUHc9RcIoVirKs264sJFVM5Fks8N1tes91a-1rnYX_vbUgjbff6zgMMoAEr0dtpIMwRFEO8nTCya96ihA8woGc1Loql5WHZzQmhacU0_9u2scvn94irM2_uceNB5I9LnTvcr337x73b9L362Wkd2pIVJMpkQmZYMMqzmpKM1EmQ6No3irRUlYolQnWY1VUJauLnknsK9UmuuGU57TiOS2KjJVppWpWM86UqCRVqic5xVFqk0aZp9Ydk8WDGkZpRvPEyBaNX6yP8-9HiHAezdA1y3i089GTnBrtg78hBR3MYps_JBY7GLUP8luUxc2geute-tM_preq5sUEJ7MzzZvHd2Hn4_iuBM8N_ysAAP__q7axkg">