<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/104414>104414</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
C++23 default comparisons is incorrectly accepted
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
marco-antognini-sonarsource
</td>
</tr>
</table>
<pre>
Sibling issue of #104413.
According to https://eel.is/c++draft/class.compare#default-1, the following program should be rejected by Clang but it isn't.
```cpp
struct A {
bool operator==(this const A, const A&) = default;
};
```
Reproducible at https://godbolt.org/z/reoWEExM7
See also https://stackoverflow.com/a/78808748/24103368 from @brevzin.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxckkFzuzYQxT_NctmxR0iyhQ8c7PjPrZfm0LMkFqxWZhlJOE0-fQfbafLPzA4sO_D28fSzOYdxImphd4LdubJLuXBqrzZ53tip8DiFKWwyTzZlXpKnynH_3r4GF8M0Ysh5IeQBQapaaF2rLYgziOPjevSeU7--WBgvpcwZ1BFkB7IjituQQXYe5AnkqU92KOtjtDlvPV9nmwik6mmwSyybGuQLlgvhwDHy26o5Jx6TvWK-8BJ7dISJ_iZfqEf3ji_RTiO6pWAoGPIE0pTfzMFePMrP82OSS1p8wSOCOT0miI45Is-UbOEE6ryWbMolZPQ85YLH1dj_7R7kAUGd8ekb1FMJzPmr_9z83c6fNCfuFx9cJLTlR1wj945j2XIaQXYfILtE_NevX__-Yb6LvBKhjfln2LlY_w_fKA2R39ZwQXYWZGeaRjRGNyA7qWuh1L7BIfEVQQuX6PYRpm3Vt6o_qIOtqK2NVEaYxujq0uraNYNplNWGTG_8rhlsfTg4Mtb7nXBVaKWQWjT1Thitld6qg9gP2u79wQvn5R60oKsNcRvj7br-WnXnqb2TpKtoHcV8R1PKid4etIGUK6mpXT_auGXMoEUMueQvmRJKpPblQZZUn4eBD6xC5iljyBgmzymRL_Edrfc0F-qrJcX2R_ahXBb3jG3d8bxt5sQrbyC7u7OV5qf1Wyv_CwAA___DgAjn">