llvm-project/clang/test/Layout
Richard Smith b5a317fbf6 Non-zero-length bit-fields make a class non-empty.
This implements the rule intended by the standard (see LWG 2358)
and the rule intended by the Itanium C++ ABI (see
https://github.com/itanium-cxx-abi/cxx-abi/pull/51), and makes
Clang match the behavior of GCC, ICC, and MSVC.

A pedantic reading of both the standard and the ABI indicate that Clang
is currently technically correct, but that's not worth much when it's
clear that the wording is wrong in both those places.

This is an ABI break for classes that derive from a class that is empty
other than one or more unnamed non-zero-length bit-fields. Such cases
are expected to be rare, but -fclang-abi-compat=6 restores the old
behavior just in case.

Differential Revision: https://reviews.llvm.org/D45174

llvm-svn: 331620
2018-05-07 06:43:30 +00:00
..
itanium-union-bitfield.cpp
ms-vtordisp-local.cpp
ms-x86-alias-avoidance-padding.cpp
ms-x86-aligned-tail-padding.cpp
ms-x86-basic-layout.cpp Print nested name specifiers for typedefs and type aliases 2017-03-10 15:04:58 +00:00
ms-x86-bitfields-vbases.cpp
ms-x86-declspec-empty_bases.cpp [MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version) 2016-05-23 17:16:12 +00:00
ms-x86-empty-base-after-base-with-vbptr.cpp
ms-x86-empty-layout.c
ms-x86-empty-nonvirtual-bases.cpp
ms-x86-empty-virtual-base.cpp
ms-x86-lazy-empty-nonvirtual-base.cpp
ms-x86-member-pointers.cpp
ms-x86-misalignedarray.cpp
ms-x86-pack-and-align.cpp Non-zero-length bit-fields make a class non-empty. 2018-05-07 06:43:30 +00: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
ms_struct-bitfields.c
v6-empty.cpp Non-zero-length bit-fields make a class non-empty. 2018-05-07 06:43:30 +00:00
watchos-standard-layout.cpp DR1672, DR1813, DR1881, DR2120: Implement recent fixes to "standard 2018-04-05 18:55:37 +00:00