llvm-project/clang/test/Layout
Akira Hatanaka adaf62ced2 [Sema] Reject array element types whose sizes aren't a multiple of their
alignments

In the following code, the first element is aligned on a 16-byte
boundary, but the remaining elements aren't:

```
typedef char int8_a16 __attribute__((aligned(16)));
int8_a16 array[4];
```

Currently clang doesn't reject the code, but it should since it can
cause crashes at runtime. This patch also fixes assertion failures in
CodeGen caused by the changes in https://reviews.llvm.org/D123649.

Differential Revision: https://reviews.llvm.org/D133711
2022-09-21 09:15:03 -07:00
..
aix-Wpacked-expecting-diagnostics.cpp Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
aix-Wpacked-no-diagnostics.cpp
aix-bitfield-alignment.c
aix-bitfield-alignment.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
aix-double-struct-member.cpp Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
aix-no-unique-address-with-double.cpp Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
aix-pack-attr-on-base.cpp
aix-packed-bitfields.c
aix-power-alignment-typedef-2.cpp [AIX] Check for typedef properly when getting preferred type align 2021-09-08 16:21:52 -04:00
aix-power-alignment-typedef.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
aix-power-natural-interaction.cpp
aix-type-align-and-pack-attr.cpp [AIX] "aligned" attribute does not decrease alignment 2021-08-29 21:33:05 -04:00
aix-virtual-function-and-base-with-double.cpp
dump-canonical.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
dump-complete.cpp
itanium-pack-and-align.cpp
itanium-union-bitfield.cpp
ms-aligned-array.c [Sema] Reject array element types whose sizes aren't a multiple of their 2022-09-21 09:15:03 -07:00
ms-vtordisp-local.cpp
ms-x86-alias-avoidance-padding.cpp
ms-x86-aligned-tail-padding.cpp
ms-x86-basic-layout.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
ms-x86-bitfields-vbases.cpp
ms-x86-declspec-empty_bases.cpp
ms-x86-empty-base-after-base-with-vbptr.cpp
ms-x86-empty-layout.c Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
ms-x86-empty-nonvirtual-bases.cpp Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
ms-x86-empty-virtual-base.cpp Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
ms-x86-lazy-empty-nonvirtual-base.cpp Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
ms-x86-member-pointers.cpp
ms-x86-misalignedarray.cpp [Sema] Reject array element types whose sizes aren't a multiple of their 2022-09-21 09:15:03 -07:00
ms-x86-pack-and-align.cpp Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
ms-x86-primary-bases.cpp
ms-x86-size-alignment-fail.cpp
ms-x86-vfvb-alignment.cpp
ms-x86-vfvb-sharing.cpp
ms-x86-vtordisp.cpp [test] Make tests pass regardless of gnu++14/gnu++17 default 2022-09-04 05:29:32 +00:00
ms_struct-bitfields.c
no-unique-address.cpp Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
v6-empty.cpp
watchos-standard-layout.cpp Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00