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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] breaks C++ code (adds space around "->")
        </td>
    </tr>

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

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

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

<pre>
    since clang 18

```c++
A::A()
    : B()
{
    Q_EMIT bar::instance()->exec();
}
```
formatted to:
```c++
A::A()
    : B()
{
    Q_EMIT bar::instance() -> exec();
}
```

This happens with any default style or even
```
---
IndentWidth: 4
---
```

original issue: https://invent.kde.org/frameworks/extra-cmake-modules/-/issues/15
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0UsFu2zoQ_BrqspBBUrRjHXSQX2Igh3coEKDHYkVuJNYUKZCUk_x9QStIm1x6KjCAoNXOzmh3MCU7eqKO7U9sf1_hmqcQu8VhxmoI5q1L1msC7dCPII6M9wUHvkEzeSrgfc-agp7JI5Mt4z0AAGt6OH1U2N3pvf7tx8P_j08wYNxY1qeMXtPWWrPmgV5JvxOb0417_6cu4_1ziDPmTAZyKFP-tSsotuDvvhjvnyabYMJlIZ_gxeYJ0L-BoWdcXYaU3xxBiEBX8l_IdV0z3j96Qz5_tyZPxav6-PBFJ0Q7Wo8ObEorldYp5yUV9_LM5Nn6K_m8uxjahTgyeX6OONNLiJfE5Jlec8Raz3iheg5mdVSqdeGVceVF7CvTNaZtWqyoE3eNElzdSV5NHTZGIKJGEo0yeEAtjlIMjVIGuTpgZTvJpRJSNGKv9pLvjGyNUao1-jC0ghRTnGa0bufcdS4Gq5tuJ0R7PLaVw4FcuuVSylv86u3kTMqS1NgVXj2sY2KKO5ty-j0p2-xumf5E3N_DEAkvCf7bEgI6GAImj2hMgrSgJsAYVm-ASVkOXsRkW63RdZ93O9o8rcNOh5nJc9F9f9RLDD9J509r3P7o2slfAQAA__8M2vmh">