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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] Inconsistent indentation of &&-qualified member functions with requires clauses
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    clang-format seems to become confused by the use of `&&` qualifications of member functions in combination with `requires` clauses on those methods. This causes it to use weirdly inconsistent indentation and bracket placement.

For example, it turns this:

```c++
Co<Final> Join() &&
 requires(!std::is_void_v<Final>)
{
  return std::move(run_stream).Join();
}

Co<k3::EmptyStruct> Join() &&
  requires std::is_void_v<Final>
{
  co_return k3::EmptyStruct{};
}
```

into this:

```c++
Co<Final> Join() &&
    requires(!std::is_void_v<Final>) { return std::move(run_stream).Join(); }

    Co<k3::EmptyStruct> Join() &&
 requires std::is_void_v<Final>
{
  co_return k3::EmptyStruct{};
}
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy8lE9v2kAQxT_N-jICmV1j4OADJEFqr-0d7Z8Bb7J_yO6YlG9frSEkUptKqapKK5C8M29-82Q_mbM9BMSOzTdsfl_JgfqYukepo8qyUtGcO-1kOEz2MXlJkBF9BoqgUEePoGPYDxkNqDNQjzBkhLgH1taMt-W0NTwP0tm91ZJsDLlce_QKE-yHoC_PbAAdvbJhrIEXS33RSPg82IS5qGgnh4wZYgDqY0bwSH00eQrfe5tBX24tFbhC8YI2GXcGG3QM2WbCQGCDwUCXITIYUEnqJyQ4OqnRY6Apq9esXm9jAvwh_dEh43ej6pBCBuptZmJ9KSpLjkczvimnXt9FJu62NkjHxAN8jTYwvmR8BVc36jXcdioXs0ym6Im1zbtTtGZ3eifA-KqMWRRlgISFAW4dPp6Q8WUawi5TQukZX03fRjKxGZvvL7Aj2ZO4tD74I52_URo0fch5A4U_M74B6ri7Mv5uzmJTWN5Dvdp3AbSB4r_wF-CTFgNbbP7CXLhZW0Z-2t7_5m5lOmFWYiUr7GaLhs_FbC5mVd9pyRdmL2TTLNpWKW6wbVq1VLKer7TZi8p2vObzWvBZ3ZSfqTFCq2Wrmla12HDDmhq9tG7q3MlPYzpUNucBu5ngQjSVkwpdfo2W1JWqiRoOmTW1s5nyWx9ZcmMIvQ8bNr-HLx99vSVkRjMn13hB82usjDlyc_qaINWQXNcTHcc3jW8Z3x4s9YOa6ugZ3xao69_kmOIjamJ8O26WGd9elzt1_GcAAAD__2O4nOM">