[clang] [Clang] Skip invalid fields when synthesizing defaulted comparisons (PR #221570)

Shengxin Pei via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 06:44:50 PDT 2026


https://github.com/TPPPP72 commented:

Looks like it's unrelated to `__is_trivially_equality_comparable`, right? So we can just simplified the test to
```
namespace GH194605 {
struct S {
  int [[clang::address_space(1)]] i; // expected-error {{field may not be qualified with an address space}}
  bool operator==(const S &) const = default;
};

static_assert(S{} == S{});
```

https://github.com/llvm/llvm-project/pull/221570


More information about the cfe-commits mailing list