hubert.reinterpretcast added inline comments.
================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1877
+ CharUnits PreferredAlign = FieldAlign;
+ if (SupportsAIXPowerAlignment && FieldOffset == CharUnits::Zero() &&
+ (IsUnion || FoundNonOverlappingEmptyField)) {
----------------
This `if` condition does not currently capture that a zero-extent array in a
base class renders the base class not empty.
```
struct Z { char zea[0]; };
struct A {
Z z [[no_unique_address]];
double d;
};
struct B : Z { double d; };
static_assert(__alignof__(A) == __alignof__(B));
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79719/new/
https://reviews.llvm.org/D79719
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits