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/containers/sequences/array
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
..
array.cons Mark deduction guide tests as failing on apple-clang-9 7 years ago
array.data [libcxx] Make return value of array<T, 0>.data() checked only for libc++ 6 years ago
array.fill Fix -verify static assert messages for older Clang versions 7 years ago
array.size Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <array> 8 years ago
array.special Fix C++03 build breakage 9 years ago
array.swap Fix -verify static assert messages for older Clang versions 7 years ago
array.tuple Fix static assert diagnostic checks in i386 6 years ago
array.zero Move test into test/std subdirectory. 10 years ago
at.pass.cpp [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types. 7 years ago
begin.pass.cpp [libcxx] Add checks for unique value of array<T, 0>.begin() and array<T, 0>.end() 6 years ago
compare.fail.cpp [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types. 7 years ago
compare.pass.cpp Update the changes to the array tests (that I committed yesterday) to use the test_comparison routines that I committed last week. NFC. 6 years ago
contiguous.pass.cpp Add tests to ensure that string/vector/array have contiguous iterators - which they did. Mark N4284 as complete 10 years ago
empty.fail.cpp [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types. 7 years ago
empty.pass.cpp More missing tests - array<>::size() and array<>::max_size() 7 years ago
front_back.pass.cpp [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types. 7 years ago
indexing.pass.cpp [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types. 7 years ago
iterators.pass.cpp [libcxx] [test] Strip trailing whitespace. NFC, no code review. 8 years ago
max_size.pass.cpp More missing tests - array<>::size() and array<>::max_size() 7 years ago
size_and_alignment.pass.cpp Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`. 6 years ago
types.pass.cpp Make std::array typedef tests more portable. 9 years ago