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

    <tr>
        <th>Summary</th>
        <td>
            Extra spaces are sometimes added around C++ '->' operators in macros, regression in clang-format 17
        </td>
    </tr>

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

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

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

<pre>
    With clang-format 17 we are seeing extra spaces are sometimes added around C++ '->' operators in
macros. This appears to be a regression from clang-format 16.

Given the following C++ code, it is indented correctly using clang-format 16:

```c++
#define FOO(var) \
    Bar::Goo aGoo; \
    auto prop = aGoo->ctx()->getThing().get(); \
    auto exp = Zoo::Too(aGoo->x());
```

using `_clang-format`:

```yaml
---
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 100
...
```

clang-format 17 yields the following:

```c++
#define FOO(var) \
    Bar::Goo aGoo;                               \
    auto prop = aGoo->ctx() -> getThing().get(); \
    auto exp = Zoo::Too(aGoo->x());
```

Notice there is extra space put around one of the '->' operators.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEVE-L6zYQ_zTyZYhxRk5sH3xIsi-hpXQPXXjQS1Hssa0ie4wk79t8-6IoS7PhdaHQ8oyxpdHoN_9_yjndT0S12OzF5ilRix_Y1j_zMB0kJmduL_VX7QdojJr6Vcd2VB7WBXwjUJbAEempB3rzVoGbVUMuynkkr8ewa1tqQVlephYOAvcC9yCwWAn5RWABPJNVnq0DPYnsSWS7UTWWXQovg3ag5pmUdeAZzgQKLPWWnNM8QWd5fPBrm0aI-D3pV5rADwQdG8PfgqfvHjTcksADaA86mG5p8tRCw9ZS480FFhfUH-CF3N0bENssvk1EvUlRttTpieD4_CywfFVWYAVic4jnAAB7ZQOW3J2YQZ2Yhdx_1FCLZ5gtzyDk01UlZKzxbwJLgVXY9ORfBj31UZL25OPq-1j0FqF-D8aC6RdmgeU78g03Xn8I7z7mmBexzf64z01Q-ofcXNRoomi1WsXFXjlqn6ff_MWQkDs4MfeG4tlP11J81a0fwlEepQc2yzj9okftg3Sd3XxK0_QTXx-b9qLJtO5jR_y_Jf38-TcFh7CDH1LyX9nrhkLaLIVpuZt2mBf_Ptw8EXB3ze735vtWqKStZVvJSiVUr4sMs822lHky1KTyImu2pSqwyteVymWmmhK7zZm2KkOZ6BozlGvMynUh5QbTqtrQueyyHKuiw2ot8oxGpU1qzOuYsu0T7dxCdZGXhUyMOpNxV6JD_NC7iIH6bB2urc5L70SeGe28-xvIa2-o_vLf0BxEhgv0c0dnenok2WSxph68n12oHh4FHnvth-WcNjwKPAbvbr_VbPlParzA4zVmJ_B4DfuvAAAA__8nDbL1">