[clang] [CIR] Use zero-initializer for partial array fills (PR #154161)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 19 09:10:34 PDT 2025


andykaylor wrote:

> > We don't support the mixed type case yet, but this is modifying the same part of the code.
> 
> It looks like you have the basic lowering for mixed types. Are you just refering to zeroinit for them?

I was specifically referring to this test case:

```
typedef struct {
     long a0;
     int a1;
} Inner;
typedef struct {
     int b0;
     Inner b1[1];
} Outer;
Outer outers[2] = {
    {1, {0, 1} },
    {1, {0, 0} }
};
```
We don't handle constant initialization for structs yet.

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


More information about the cfe-commits mailing list