You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcxx/test/std/utilities
Eric Fiselier 272871b658 Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`.
Summary:
Starting in Clang 8.0 and GCC 8.0, `alignof` and `__alignof` return different values in same cases. Specifically `alignof` and `_Alignof` return the minimum alignment for a type, where as `__alignof` returns the preferred alignment. libc++ currently uses `__alignof` but means to use `alignof`. See  llvm.org/PR39713

This patch introduces the macro `_LIBCPP_ALIGNOF` so we can control which spelling gets used.

This patch does not introduce any ABI guard to provide the old behavior with newer compilers. However, if we decide that is needed, this patch makes it trivial to implement.

I think we should commit this change immediately, and decide what we want to do about the ABI afterwards. 

Reviewers: ldionne, EricWF

Reviewed By: ldionne, EricWF

Subscribers: jyknight, christof, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@351289 91177308-0d34-0410-b5e6-96231b3b80d8
6 years ago
..
allocator.adaptor [libcxx] [test] Fix line endings, avoid unnecessary non-ASCII. 7 years ago
any [libcxx] Use clang-verify in the lit test suite even when availability is enabled 6 years ago
charconv [NFC] Normalize some test 'main' signatures 6 years ago
function.objects [NFC] Normalize some test 'main' signatures 6 years ago
intseq [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER. 8 years ago
memory [libcxx] Use custom allocator's `construct` in C++03 when available. 6 years ago
meta Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`. 6 years ago
optional [libcxx] Reorganize tests since the application of P0602R4 6 years ago
ratio Move remaining _LIBCPP_VERSION tests into test/libcxx 9 years ago
smartptr/unique.ptr Change (void) casts to TEST_IGNORE_NODISCARD, as requested by Eric. Reviewed as https://reviews.llvm.org/D40065 7 years ago
template.bitset [libcxx] [test] Remove asserts that <cstddef> and <stdexcept> are included by <bitset> 6 years ago
time Don't use the form '2017y' in tests, since some gcc versions don't allow it 6 years ago
tuple Change from a to a . Fixes PR#39871. 6 years ago
type.index Portability fix: add missing includes and static_casts. Reviewed as https://reviews.llvm.org/D55777. Thanks to Andrey Maksimov for the patch. 6 years ago
utilities.general Move test into test/std subdirectory. 10 years ago
utility [pair] Mark constructors as conditionally noexcept 6 years ago
utility.requirements Move test into test/std subdirectory. 10 years ago
variant [libcxx] Reorganize tests since the application of P0602R4 6 years ago
nothing_to_do.pass.cpp Move test into test/std subdirectory. 10 years ago