================ @@ -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)!"); ---------------- Endilll wrote:
This check has been broken, because `sizeof` didn't take into the account that `Type` objects are actually laid out in memory on 16-byte boundary, which results in 24 bytes of data and 8 bytes of padding. My change just affirms the status quo that Type is indeed takes 16 bytes more memory than `ExtQuals`, which has size 16. https://github.com/llvm/llvm-project/pull/68377 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits