__alignof__(x) always returns ABIAlign if the "x" is marked __attribute__((aligned())). However, the "aligned" attribute should only increase the alignment of a struct, or struct member, unless it's used together with the "packed" attribute, or used as a part of a typedef, in which case, the "aligned" attribute can both increase and decrease alignment.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM, other then 1 small test update.
| clang/test/Layout/aix-alignof-align-and-pack-attr.cpp | ||
|---|---|---|
| 22 | Minor nit: add namespace test3 {
struct __attribute__((__aligned__(16))) C {
double x;
} c;as a third test. | |
Minor nit: add
namespace test3 { struct __attribute__((__aligned__(16))) C { double x; } c;as a third test.