================
@@ -844,7 +847,18 @@ const FieldDecl 
*CodeGenFunction::FindFlexibleArrayMemberField(
       if (const FieldDecl *Field =
----------------
bwendling wrote:

I did several tests, and it looks like if there's an inner struct that's not 
accessible, that doesn't affect the offsets of fields outside of that inner 
struct.

```c
struct foo {
  struct inner_1 {
    /* fields */
  };
  struct inner_2 {
    int a;               /* __builtin_offsetof is 0 */
  };
  int b;                 /* __builtin_offsetof is 0 */
};
```

@efriedma-quic Do you have any thoughts?


https://github.com/llvm/llvm-project/pull/89126
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to