[clang] [Sema] Add check for bitfield assignments to larger integral types (PR #68276)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 24 04:59:32 PDT 2023


joanahalili wrote:

Hello, 
This commit is causing clang crashes on our end. Here is a reproducer:

repro Cmd: `clang -O0  -std=gnu++20  -fsized-deallocation -Xclang -target-feature -Xclang +sse4.2  -c fileName.ii`

where fileName.ii is
```
template <class a, class... b> bool c = __is_constructible(a, b...);
template <bool, class> using d = int;
template <class> bool e;
template <typename> struct f;
template <typename g> struct h {
  static void i() { c<g, char>; }
};
struct j {
  template <typename k, typename g, d<e<k>, int> = 0>
  void l(unsigned long, f<g> (k::*)());
};
template <typename k, typename g, int> void j::l(unsigned long, f<g> (k::*)()) {
  h<g>::i;
}
struct m : j {
  struct n;
  void o() { l(8, &m::p); }
  f<n> p();
};
struct m::n {
  int q : 1;
};

```

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


More information about the cfe-commits mailing list