<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/130753>130753</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
False positive `clangd(unused-includes)` with deduced return `operator<=>`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Eisenwave
</td>
</tr>
</table>
<pre>
The following code raises `clang(implied_comparison_category_type_not_found)`:
```cpp
struct awoo {
friend auto operator<=>(awoo,awoo) = default;
};
```
The following code then raises: `clangd(unused-includes)`:
```cpp
#include <compare>
struct awoo {
friend auto operator<=>(awoo,awoo) = default;
};
```
Not sure how to reproduce on Compiler Explorer.
To fix it, one must use `std::strong_ordering` instead of `auto`.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0kr-O4zgMxp-GbogJZClx7MJFJpmUV00fKBZt6yCLhv4kM29_UCa3W-xgt1rDAAmIpPj79OkY7eSJeti9wu5U6ZxmDv2bjeTv-kbVlc1n_z4Tjuwc362fcGBDGLSNFBEaMTjtJ5CtXVZnyVwGXlYdbGR_GXSiicPnJX2udPGcLiNnb0B20AhQBxCHkjz-YV1BHGIKeUio78wI-1cQBxyDJW9Q58TIKwWdOIA6gjqBegPZllqQx6_QIagTGhp1dglUGQD70zP5_yoQh2-I0kz-iQXq8IPMgGyzz5HMi_WDy4bib_YHqZ5VCOr4JQWVPb9FQ_w7dP9wwpgD4cx3TIyB1sAmD4Ts8cjLah0FfPtYHQcKm9ItDu-Mo_1Am0AekT3hkmPCHKlIEZMpvKpQsJ8uHAwF6ydoBFofE2mDPJbKQgKN2FSmV6ZTna6or_fbuunqTm2ruadmvxsHLeW1betGtuMgr2q717LVY73vVGV7KeROqLp87W67kaMgadRYXzuxVUbAVtCirds4d1s2HKbKxpipr5XY71Tl9JVcfDhaSk93fJyClMXgoS9NL9c8RdgKZ2OKP8ckmxz1Z-0i4crRJnujPxsB7zbNaKgIbDBQysGXrl-fsxFVDq6fU1qLx0CeQZ4nm-Z83Qy8gDyXVZ7hZQ38Lw0J5PkBEEGen4S3Xv4XAAD__81eK0s">