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

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 19 15:33:43 PDT 2024


bwendling wrote:

> Does this still work for cases where there are multiple flexible arrays? e.g.
> 
> ```
> struct weird_protocol {
>     unsigned int cmd_type;
>     unsigned int data_len;
>     union {
>         struct cmd_one one[];
>         struct cmd_two two[];
>         struct cmd_three three[];
>         unsigned char raw_bytes[];
>     };
> };
> ```

Ah! One of your heresies. :-)

The current code probably doesn't support this (I'll check). This PR shouldn't change this. I'll have to revisit this code to make sure that it can be supported.

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


More information about the cfe-commits mailing list