[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)
Amirreza Ashouri via cfe-commits
cfe-commits at lists.llvm.org
Thu May 23 12:46:22 PDT 2024
AMP999 wrote:
This patch seems to break the following example (works in trunk, breaks after this patch). Could you please add a test case for this?
https://godbolt.org/z/rdn74xn9M
```
struct S {
bool operator==(const S&) const = default;
};
struct Derived : S {
int j_ = 0;
};
static_assert(!__is_trivially_equality_comparable(S));
static_assert(!__is_trivially_equality_comparable(Derived));
bool test1(Derived& a, Derived& b) {
return a == b;
}
bool test2(Derived& a, Derived& b) {
return a.j_ == b.j_;
}
```
https://github.com/llvm/llvm-project/pull/93113
More information about the cfe-commits
mailing list