[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 6 05:47:17 PDT 2023
================
@@ -1982,9 +1986,9 @@ class alignas(8) Type : public ExtQualsTypeCommonBase {
Type(TypeClass tc, QualType canon, TypeDependence Dependence)
: ExtQualsTypeCommonBase(this,
canon.isNull() ? QualType(this_(), 0) : canon) {
- static_assert(sizeof(*this) <= 8 + sizeof(ExtQualsTypeCommonBase),
+ static_assert(sizeof(*this) <= 16 + sizeof(ExtQualsTypeCommonBase),
"changing bitfields changed sizeof(Type)!");
----------------
AaronBallman wrote:
Would it make sense to change this to use `alignof(decltype(*this))` rather than `16` to make the connection to alignment more obvious?
https://github.com/llvm/llvm-project/pull/68377
More information about the cfe-commits
mailing list