[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 17 04:56:53 PDT 2024


bgra8 wrote:

@dtemirbulatov  this patch causes `clang` to crash. Please revert.

repro.cc:

```
typedef __SVFloat32_t a;
#pragma clang attribute push(__attribute__((target("+sve"))),                  \
                             apply_to = function)
template <int, int> struct b {
  using c = int;
};
template <class q> using e = q::c;
template <int f, int l> a g(b<f, l>, float);
template <class q> using h = decltype(g(q(), e<q>()));
h<b<0, 0>> i(b<0, 0>);
template <class q> using j = decltype(i(q()));
template <class k> struct m {
  static void n() {
    b<0, 0> d;
    k()(float(), d);
  }
};
template <class k> struct p {
  template <typename c, class q> void operator()(c, q p2) {
    int o;
    int misalignments[]{};
    for (int ma : misalignments)
      for (int mb : misalignments)
        k()(p2, 0, ma, mb, o);
  }
};
struct D {
  template <class q> void operator()(q, int, int, int, int) {
    [](j<q>) {};
  }
  void r() { m<p<D>>::n; }
};
#pragma clang attribute pop
```

Compilation command:
```
clang -cc1 -triple aarch64-unknown-linux-gnu  \
  -fsyntax-only \
  -std=gnu++20 \
  -x c++ \
  repro.cc
```


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


More information about the cfe-commits mailing list