[clang] [Clang][NFC] Improve testing for the flexible array member (PR #89462)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 19 16:04:13 PDT 2024


efriedma-quic wrote:

Strictly speaking, I don't think this is NFC.  Consider, for example:

```
struct S {
  struct X { int array[1]; } x;
  struct Y { int count; int array[] __attribute__((__counted_by__(count))); } y;
};
void f(void* __attribute__((pass_dynamic_object_size(0))));
void g(struct S* s) { f(s->y.array); }
```

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


More information about the cfe-commits mailing list