================
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -fno-rtti -triple aarch64-windows-msvc 
-fdump-record-layouts -fsyntax-only %s 2>/dev/null \
+// RUN:            | FileCheck %s -check-prefix CHECK-ARM64
+// RUN: %clang_cc1 -fno-rtti -triple arm64ec-windows-msvc 
-fdump-record-layouts -fsyntax-only %s 2>/dev/null \
+// RUN:            | FileCheck %s -check-prefix CHECK-X64
+// RUN: %clang_cc1 -fno-rtti -triple x86_64-windows-msvc -fdump-record-layouts 
-fsyntax-only %s 2>/dev/null \
+// RUN:            | FileCheck %s -check-prefix CHECK-X64
+
+// On Arm64 (but not Arm64EC or x64), MSVC reuses the tail padding of an
+// over-aligned base class for a subsequent base class.
+
+struct alignas(16) Type {
+  long long a, b, c;
----------------
efriedma-quic wrote:

Some potential variations to test:

- ensure this works for alignas on individual fields as well.
- ensure we insert necessary padding before an overaligned base.

https://github.com/llvm/llvm-project/pull/210461
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to