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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] RemoveSemicolon spuriously removing semicolon with trailing requires
        </td>
    </tr>

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

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

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

<pre>
    Tested on main (595573d1edeb0896aeeca84ac5146e11c937305e), with the `RemoveSemicolon` option enabled.

The following code
```cpp
template <typename Foo>
void Fun(const Foo &F)
  requires requires(Foo F) {
    { F.Bar() } -> std::same_as<int>;
  };
```

is formatted to
```cpp
template <typename Foo>
void Fun(const Foo &F)
  requires requires(Foo F) {
    { F.Bar() } -> std::same_as<int>;
 }
```

Specifically, it incorrectly removes the semicolon at the end.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzUU9uOpSoQ_ZryhWyDIF4efLB7tx9wut9PEMst5yA4gLuz_36C9iUz8wWTkFCpC9SqVUuGoG8WsQPxBOKayT0uznd-lf5_9Nnopkf3hiHiRJwlq9SWAGtEK0TNpwInHGnTVhJRyaaUShRlhUWhWl5zKhBYC-yZvOu4kLgggYr-g6u74yuuWjnjLFSUuC1qZwlaORqccqA90P5tQTI7Y9y7tjei3ITJX9HzqG0D2kdcNyMjEuDP8bGhlSuSwTngL0D7u9MTGXYLrFHOhpgiBFg1pK5oT4jHH7v2GL4MYE3KSQkE6qcjiSSLDPmT9MCaM3IlF-AvJMQJeA-8D3LFf2UA_qxtTJ_zsxbq62l-9X1i04HMzq8yprFG99cBS7j-APW6odKzVtKYRyJdR6Ktct6jiuZB_MF7ONYgfLJPZDwcaKc8mzo-tbyVGXZFLSouBG_rbOmEKkuqZj7OXCKrRcNmhYiswRbFzFimO0aZoA1raMlaUedsrimWUz01VMiiKKCkuEptcmPua-78LdMh7NgVQtRllRk5ogmHAhhTRtrb5aQHGEua8F2qu4z7LUBJjQ4xfL8UdTSHen4pFFfy26KTsO1euz18ziKt9fcgTol4qU3yf_KW7d50S4xbSHywAdhw03HZx1y5FdiQuvi4Lpt3_6GKwIYDXAA2fOC7d-xnAAAA__8S0DLx">