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

    <tr>
        <th>Summary</th>
        <td>
            Clang-format confused trailing return type
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Problem found when upgrading from 16-RC2 to 16.0.0
````
struct EXPORT_MACRO [[nodiscard]] C
{
   using U = int;
   auto f() noexcept -> void {}
   auto g() -> void {}
};
````
gets reformatted to
````
struct EXPORT_MACRO [[nodiscard]] C
{
   using U = int;
   auto f() noexcept -> void {}
   auto g()->void {}
};
````
Note in function `g()` that `->` has no spaces around it while `f()` does have them.

[reproduction.zip](https://github.com/llvm/llvm-project/files/11068943/reproduction.zip) contains full reproduction for this
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUU01v2zoQ_DXUZWGBIvVhHXTwR3x4wHsJgteit4KWVhILmhTIZdL01xdUHLhFesmxgCBR5HB2ZjGrQtCTRexYtWfVMVORZue7fz7vFrTZ2Q0v3YN3Z4MXGF20AzzPaCEuk1eDthOM3l2gqDePBwHkoKhznnPGj4zvWM1vz7oTyMee4O7Lw_3j_1__3R0e72Gtu7du0KFXfmDVkVVHOFwpmv3rAgBiSPU-AZNH0JaYvB2pSA5GJrZMtGAdfu9xIdgweQdPTg-QaJrj7_DpCv8zKi3eCrz3MSEF8Dg6f1FEOAC5v8hyAn3Q8H-OELSFMdqetLPAan5lYzUHmhWlrcSc_mcVwDoIi-oxgPJrcDTB86wNJuB4uzs4DDCrJwSa8ZJfFby-q73HxbshrkXzH3pJvRLbmWgJTO6YODFxmjTN8Zz37sLEyZint89m8e4b9sTEadQGAxOnouD1ti0lE6d3zKKF3llS2gYYozHwKwJG54FmHbKhk0MrW5VhV9RN25RtXTXZ3GFTlNu-aVWlCl4WuK0UH891KRqOvG0x053gQnIpqkLyRjY5l2VZlVU1CtGjbBUrOV6UNnkSnzs_ZTqEiF1dNJxnRp3RhHVMhbD4DOshEyJNre9Ww-c4BVZyowOFGwtpMtgdjLLT5jWyyegYQwquV9qkkHmk6C3Qy4JZ9Kb7cItXOanHq9yfAQAA___Dk0Wd">