zig_clang: Fix ZigClangAPValue being underaligned vs clang::APValue.

Also add a static_assert to catch future alignment mismatches on this type, and
reflect recent layout changes in the Zig bindings.
This commit is contained in:
Alex Rønne Petersen
2025-04-07 20:36:26 +02:00
parent 70437354c0
commit 79a620d617
3 changed files with 14 additions and 10 deletions

View File

@@ -2329,6 +2329,7 @@ static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::Zi
static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::ZigClangUnaryExprOrTypeTrait_KindOpenMPRequiredSimdAlign == clang::UnaryExprOrTypeTrait::UETT_OpenMPRequiredSimdAlign, "");
static_assert(sizeof(ZigClangAPValue) == sizeof(clang::APValue), "");
static_assert(alignof(ZigClangAPValue) == alignof(clang::APValue), "");
static_assert(sizeof(ZigClangSourceLocation) == sizeof(clang::SourceLocation), "");
static ZigClangSourceLocation bitcast(clang::SourceLocation src) {