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

    <tr>
        <th>Summary</th>
        <td>
            clang-format does bad things with requires + decltype(auto)
        </td>
    </tr>

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

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

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

<pre>
    The decltype(auto) is on the same line as the requires clause.
```cpp
  template <class T>
 requires(std::same_as<int, T>) decltype(auto)
  oops() {}
```

Inserting ``//clang-format off` makes it worse
```cpp
 template <class T>
  // clang-format off
 requires(std::same_as<int, T>)
      // clang-format on
 decltype(auto)
    oops() {}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUks-Om0AMxp_GXKyNhpnw78BhkzRS73uvDBiY3YGheGi0b19BEq3aZlsVIRC2-dnfNyYR243MJSQHSE4RLaH3c9nQSG-vUeWb9_KlZ2y4duF9YtA5LcGDLtAK-hFDzyg0MDo7MpJsgZm_L3ZmwdrRIrwDdQL1DKm63vU0XSOIgYfJUWAEc6wdieALmC-37B0DOpfQgHkG87z2-kYC5mjHAPp4rdfFgwnvPbyfVsRaBNkBstNv49w-t-fXUXgOduzwltNn0Ofa0dg9tX4eKKBvW0gVDvTGgjbgxc_Cnyr8q0C84vEP_v_rvxPX6yF1vFV87tO_nYqa0jSFKSjiMk6zeB9nSpmoLytdJHvKqCjaLK3aNKtTkxRVE7NJ6ypRkS210jrWcaG0Ucrscp3lWV5XVOdkqCXYKx7Iup1zP4adn7vIiixcJkWS5ZGjip1sO6r1yBfckqD1urJzuf7zVC2dwF45K0E-KMEGx-UvVjSeBStqMPR27AQvNvQfKwv68MCjaJld2YcwyXoMm7-dDf1S7Wo_gD6v_W6vp2n2r1wH0OdtSgF93lT8DAAA__8yBwYX">