Issue 130753
Summary False positive `clangd(unused-includes)` with deduced return `operator<=>`
Labels new issue
Assignees
Reporter Eisenwave
    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`.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to