From: Louis Dionne Date: Fri, 11 Sep 2020 15:05:22 +0000 (-0400) Subject: [libcxx] Remove the 'availability' Lit feature X-Git-Tag: llvmorg-13-init~12337 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f980ed4184f9d9139961e21739d7692ea86b0ccf;p=platform%2Fupstream%2Fllvm.git [libcxx] Remove the 'availability' Lit feature Instead, use with_system_cxx_lib with various compile-only tests to ensure that we're getting compile-time errors, as expected. This follows the lead of ec46cfefe80d5. --- diff --git a/libcxx/docs/DesignDocs/AvailabilityMarkup.rst b/libcxx/docs/DesignDocs/AvailabilityMarkup.rst index 2380385..26975a7 100644 --- a/libcxx/docs/DesignDocs/AvailabilityMarkup.rst +++ b/libcxx/docs/DesignDocs/AvailabilityMarkup.rst @@ -78,8 +78,6 @@ the following features will be made available: - with_system_cxx_lib=macosx - with_system_cxx_lib=macosx10.12 - with_system_cxx_lib=x86_64-apple-macosx10.12 - - availability=macosx - - availability=macosx10.12 These features are used to XFAIL a test that fails when deployed on (or is compiled for) an older system. For example, if the test exhibits a bug in the diff --git a/libcxx/test/libcxx/language.support/support.dynamic/aligned_alloc_availability.verify.cpp b/libcxx/test/libcxx/language.support/support.dynamic/aligned_alloc_availability.verify.cpp new file mode 100644 index 0000000..aa75b70 --- /dev/null +++ b/libcxx/test/libcxx/language.support/support.dynamic/aligned_alloc_availability.verify.cpp @@ -0,0 +1,61 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Make sure we get compile-time availability errors when trying to use aligned +// allocation/deallocation on deployment targets that don't support it. + +// UNSUPPORTED: c++03, c++11, c++14 + +// Aligned allocation was not provided before macosx10.14. +// Support for that is broken prior to Clang 8 and Apple Clang 11. +// UNSUPPORTED: apple-clang-9, apple-clang-10 +// UNSUPPORTED: clang-5, clang-6, clang-7 + +// REQUIRES: with_system_cxx_lib=macosx10.13 || \ +// REQUIRES: with_system_cxx_lib=macosx10.12 || \ +// REQUIRES: with_system_cxx_lib=macosx10.11 || \ +// REQUIRES: with_system_cxx_lib=macosx10.10 || \ +// REQUIRES: with_system_cxx_lib=macosx10.9 + +#include +#include + +#include "test_macros.h" + +constexpr auto OverAligned = __STDCPP_DEFAULT_NEW_ALIGNMENT__ * 2; + +struct alignas(OverAligned) A { }; + +int main(int, char**) +{ + // Normal versions + { + A *a1 = new A; // expected-error-re {{aligned allocation function of type {{.+}} is only available on}} + // `delete` is also required by the line above if construction fails + // expected-error-re@-2 {{aligned deallocation function of type {{.+}} is only available on}} + + delete a1; // expected-error-re {{aligned deallocation function of type {{.+}} is only available on}} + + A* a2 = new(std::nothrow) A; // expected-error-re {{aligned allocation function of type {{.+}} is only available on}} + // `delete` is also required above for the same reason + // expected-error-re@-2 {{aligned deallocation function of type {{.+}} is only available on}} + } + + // Array versions + { + A *a1 = new A[2]; // expected-error-re {{aligned allocation function of type {{.+}} is only available on}} + // `delete` is also required by the line above if construction fails + // expected-error-re@-2 {{aligned deallocation function of type {{.+}} is only available on}} + + delete[] a1; // expected-error-re {{aligned deallocation function of type {{.+}} is only available on}} + + A* a2 = new(std::nothrow) A[2]; // expected-error-re {{aligned allocation function of type {{.+}} is only available on}} + // `delete` is also required above for the same reason + // expected-error-re@-2 {{aligned deallocation function of type {{.+}} is only available on}} + } +} diff --git a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp index 6ed7e75..0d67cda 100644 --- a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp +++ b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp @@ -21,11 +21,6 @@ // XFAIL: with_system_cxx_lib=macosx10.10 // XFAIL: with_system_cxx_lib=macosx10.9 -// The test will fail on deployment targets that do not support sized deallocation. -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 - // AppleClang < 10 incorrectly warns that aligned allocation is not supported // even when it is supported. // UNSUPPORTED: apple-clang-9 diff --git a/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp b/libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp similarity index 79% rename from libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp rename to libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp index 749c947..4b5a47e 100644 --- a/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp +++ b/libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp @@ -15,11 +15,11 @@ // GCC 5 doesn't support aligned allocation // UNSUPPORTED: gcc-5 -// XFAIL: availability=macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 +// XFAIL: with_system_cxx_lib=macosx10.13 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 #include @@ -29,7 +29,3 @@ #ifdef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION # error "libc++ should have aligned allocation in C++17 and up when targeting a platform that supports it" #endif - -int main(int, char**) { - return 0; -} diff --git a/libcxx/test/libcxx/thread/atomic.availability.verify.cpp b/libcxx/test/libcxx/thread/atomic.availability.verify.cpp index 45028da..643e591 100644 --- a/libcxx/test/libcxx/thread/atomic.availability.verify.cpp +++ b/libcxx/test/libcxx/thread/atomic.availability.verify.cpp @@ -7,8 +7,13 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11 -// REQUIRES: with_system_cxx_lib=macosx -// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15 +// REQUIRES: with_system_cxx_lib=macosx10.9 || \ +// REQUIRES: with_system_cxx_lib=macosx10.10 || \ +// REQUIRES: with_system_cxx_lib=macosx10.11 || \ +// REQUIRES: with_system_cxx_lib=macosx10.12 || \ +// REQUIRES: with_system_cxx_lib=macosx10.13 || \ +// REQUIRES: with_system_cxx_lib=macosx10.14 || \ +// REQUIRES: with_system_cxx_lib=macosx10.15 // Test the availability markup on the C++20 Synchronization Library // additions to . diff --git a/libcxx/test/libcxx/thread/barrier.availability.verify.cpp b/libcxx/test/libcxx/thread/barrier.availability.verify.cpp index 16d67fb..f8537f5 100644 --- a/libcxx/test/libcxx/thread/barrier.availability.verify.cpp +++ b/libcxx/test/libcxx/thread/barrier.availability.verify.cpp @@ -7,8 +7,13 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11 -// REQUIRES: with_system_cxx_lib=macosx -// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15 +// REQUIRES: with_system_cxx_lib=macosx10.9 || \ +// REQUIRES: with_system_cxx_lib=macosx10.10 || \ +// REQUIRES: with_system_cxx_lib=macosx10.11 || \ +// REQUIRES: with_system_cxx_lib=macosx10.12 || \ +// REQUIRES: with_system_cxx_lib=macosx10.13 || \ +// REQUIRES: with_system_cxx_lib=macosx10.14 || \ +// REQUIRES: with_system_cxx_lib=macosx10.15 // Test the availability markup on std::barrier. diff --git a/libcxx/test/libcxx/thread/latch.availability.verify.cpp b/libcxx/test/libcxx/thread/latch.availability.verify.cpp index f468ebf..25a1610 100644 --- a/libcxx/test/libcxx/thread/latch.availability.verify.cpp +++ b/libcxx/test/libcxx/thread/latch.availability.verify.cpp @@ -7,8 +7,13 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11 -// REQUIRES: with_system_cxx_lib=macosx -// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15 +// REQUIRES: with_system_cxx_lib=macosx10.9 || \ +// REQUIRES: with_system_cxx_lib=macosx10.10 || \ +// REQUIRES: with_system_cxx_lib=macosx10.11 || \ +// REQUIRES: with_system_cxx_lib=macosx10.12 || \ +// REQUIRES: with_system_cxx_lib=macosx10.13 || \ +// REQUIRES: with_system_cxx_lib=macosx10.14 || \ +// REQUIRES: with_system_cxx_lib=macosx10.15 // Test the availability markup on std::latch. diff --git a/libcxx/test/libcxx/thread/semaphore.availability.verify.cpp b/libcxx/test/libcxx/thread/semaphore.availability.verify.cpp index 5d92461..284ee96 100644 --- a/libcxx/test/libcxx/thread/semaphore.availability.verify.cpp +++ b/libcxx/test/libcxx/thread/semaphore.availability.verify.cpp @@ -7,8 +7,13 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11 -// REQUIRES: with_system_cxx_lib=macosx -// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 || availability=macosx10.15 +// REQUIRES: with_system_cxx_lib=macosx10.9 || \ +// REQUIRES: with_system_cxx_lib=macosx10.10 || \ +// REQUIRES: with_system_cxx_lib=macosx10.11 || \ +// REQUIRES: with_system_cxx_lib=macosx10.12 || \ +// REQUIRES: with_system_cxx_lib=macosx10.13 || \ +// REQUIRES: with_system_cxx_lib=macosx10.14 || \ +// REQUIRES: with_system_cxx_lib=macosx10.15 // Test the availability markup on std::counting_semaphore and std::binary_semaphore. diff --git a/libcxx/test/libcxx/utilities/charconv/charconv.to.chars/availability.fail.cpp b/libcxx/test/libcxx/utilities/charconv/charconv.to.chars/availability.fail.cpp index cd09942..70f5d3c 100644 --- a/libcxx/test/libcxx/utilities/charconv/charconv.to.chars/availability.fail.cpp +++ b/libcxx/test/libcxx/utilities/charconv/charconv.to.chars/availability.fail.cpp @@ -7,8 +7,12 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 -// REQUIRES: with_system_cxx_lib=macosx -// REQUIRES: availability=macosx10.9 || availability=macosx10.10 || availability=macosx10.11 || availability=macosx10.12 || availability=macosx10.13 || availability=macosx10.14 +// REQUIRES: with_system_cxx_lib=macosx10.9 || \ +// REQUIRES: with_system_cxx_lib=macosx10.10 || \ +// REQUIRES: with_system_cxx_lib=macosx10.11 || \ +// REQUIRES: with_system_cxx_lib=macosx10.12 || \ +// REQUIRES: with_system_cxx_lib=macosx10.13 || \ +// REQUIRES: with_system_cxx_lib=macosx10.14 // Test the availability markup on std::to_chars. diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp index b092fa1..eb7f5ad 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp @@ -15,21 +15,14 @@ // Aligned allocation was not provided before macosx10.14 and as a result we // get availability errors when the deployment target is older than macosx10.14. -// However, AppleClang 10 (and older) don't trigger availability errors, and -// Clang < 8.0 doesn't warn for 10.13. -// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9 - -// On AppleClang 10 (and older), instead of getting an availability failure -// like above, we get a link error when we link against a dylib that does -// not export the aligned allocation functions. -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9 +// However, support for that was broken prior to Clang 8 and AppleClang 11. +// UNSUPPORTED: apple-clang-9, apple-clang-10 +// UNSUPPORTED: clang-5, clang-6, clang-7 +// XFAIL: with_system_cxx_lib=macosx10.13 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp index bfa5f15..6b372e0 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp @@ -13,21 +13,14 @@ // Aligned allocation was not provided before macosx10.14 and as a result we // get availability errors when the deployment target is older than macosx10.14. -// However, AppleClang 10 (and older) don't trigger availability errors, and -// Clang < 8.0 doesn't warn for 10.13. -// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9 - -// On AppleClang 10 (and older), instead of getting an availability failure -// like above, we get a link error when we link against a dylib that does -// not export the aligned allocation functions. -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9 +// However, support for that was broken prior to Clang 8 and AppleClang 11. +// UNSUPPORTED: apple-clang-9, apple-clang-10 +// UNSUPPORTED: clang-5, clang-6, clang-7 +// XFAIL: with_system_cxx_lib=macosx10.13 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp index 869e29a..e9e9d95 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp @@ -13,21 +13,14 @@ // Aligned allocation was not provided before macosx10.14 and as a result we // get availability errors when the deployment target is older than macosx10.14. -// However, AppleClang 10 (and older) don't trigger availability errors, and -// Clang < 8.0 doesn't warn for 10.13. -// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9 - -// On AppleClang 10 (and older), instead of getting an availability failure -// like above, we get a link error when we link against a dylib that does -// not export the aligned allocation functions. -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9 +// However, support for that was broken prior to Clang 8 and AppleClang 11. +// UNSUPPORTED: apple-clang-9, apple-clang-10 +// UNSUPPORTED: clang-5, clang-6, clang-7 +// XFAIL: with_system_cxx_lib=macosx10.13 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp index 6f346a7..e7a1e40 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp @@ -11,21 +11,14 @@ // Aligned allocation was not provided before macosx10.14 and as a result we // get availability errors when the deployment target is older than macosx10.14. -// However, AppleClang 10 (and older) don't trigger availability errors, and -// Clang < 8.0 doesn't warn for 10.13. -// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9 - -// On AppleClang 10 (and older), instead of getting an availability failure -// like above, we get a link error when we link against a dylib that does -// not export the aligned allocation functions. -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9 +// However, support for that was broken prior to Clang 8 and AppleClang 11. +// UNSUPPORTED: apple-clang-9, apple-clang-10 +// UNSUPPORTED: clang-5, clang-6, clang-7 +// XFAIL: with_system_cxx_lib=macosx10.13 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp index cdebcda..1274ddf 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp @@ -12,12 +12,10 @@ // when sized deallocation is not supported, e.g., prior to C++14. // UNSUPPORTED: sanitizer-new-delete -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 - -// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation. // REQUIRES: -fsized-deallocation // ADDITIONAL_COMPILE_FLAGS: -fsized-deallocation diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp index f50507a..4d0100d 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp @@ -15,21 +15,14 @@ // Aligned allocation was not provided before macosx10.14 and as a result we // get availability errors when the deployment target is older than macosx10.14. -// However, AppleClang 10 (and older) don't trigger availability errors, and -// Clang < 8.0 doesn't warn for 10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9 - -// On AppleClang 10 (and older), instead of getting an availability failure -// like above, we get a link error when we link against a dylib that does -// not export the aligned allocation functions. -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9 +// However, support for that was broken prior to Clang 8 and AppleClang 11. +// UNSUPPORTED: apple-clang-9, apple-clang-10 +// UNSUPPORTED: clang-5, clang-6, clang-7 +// XFAIL: with_system_cxx_lib=macosx10.13 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp index 80ec88e..01cb886 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp @@ -10,21 +10,14 @@ // Aligned allocation was not provided before macosx10.14 and as a result we // get availability errors when the deployment target is older than macosx10.14. -// However, AppleClang 10 (and older) don't trigger availability errors, and -// Clang < 8.0 doesn't warn for 10.13. -// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9 - -// On AppleClang 10 (and older), instead of getting an availability failure -// like above, we get a link error when we link against a dylib that does -// not export the aligned allocation functions. -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9 +// However, support for that was broken prior to Clang 8 and AppleClang 11. +// UNSUPPORTED: apple-clang-9, apple-clang-10 +// UNSUPPORTED: clang-5, clang-6, clang-7 +// XFAIL: with_system_cxx_lib=macosx10.13 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 // asan and msan will not call the new handler. // UNSUPPORTED: sanitizer-new-delete diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp index 0a42fba..930eff9 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp @@ -10,21 +10,14 @@ // Aligned allocation was not provided before macosx10.14 and as a result we // get availability errors when the deployment target is older than macosx10.14. -// However, AppleClang 10 (and older) don't trigger availability errors, and -// Clang < 8.0 doesn't warn for 10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9 - -// On AppleClang 10 (and older), instead of getting an availability failure -// like above, we get a link error when we link against a dylib that does -// not export the aligned allocation functions. -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9 +// However, support for that was broken prior to Clang 8 and AppleClang 11. +// UNSUPPORTED: apple-clang-9, apple-clang-10 +// UNSUPPORTED: clang-5, clang-6, clang-7 +// XFAIL: with_system_cxx_lib=macosx10.13 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 // asan and msan will not call the new handler. // UNSUPPORTED: sanitizer-new-delete diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp index 655ec93..62ceafb 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp @@ -11,21 +11,14 @@ // Aligned allocation was not provided before macosx10.14 and as a result we // get availability errors when the deployment target is older than macosx10.14. -// However, AppleClang 10 (and older) don't trigger availability errors, and -// Clang < 8.0 doesn't warn for 10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10 || clang-7) && availability=macosx10.13 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10 -// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9 - -// On AppleClang 10 (and older), instead of getting an availability failure -// like above, we get a link error when we link against a dylib that does -// not export the aligned allocation functions. -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.12 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.11 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.10 -// XFAIL: (apple-clang-9 || apple-clang-10) && with_system_cxx_lib=macosx10.9 +// However, support for that was broken prior to Clang 8 and AppleClang 11. +// UNSUPPORTED: apple-clang-9, apple-clang-10 +// UNSUPPORTED: clang-5, clang-6, clang-7 +// XFAIL: with_system_cxx_lib=macosx10.13 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp index e827ff61..22ea35e 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp @@ -12,9 +12,9 @@ // when sized deallocation is not supported, e.g., prior to C++14. // UNSUPPORTED: sanitizer-new-delete -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 +// XFAIL: with_system_cxx_lib=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.10 +// XFAIL: with_system_cxx_lib=macosx10.9 // NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation. // REQUIRES: -fsized-deallocation diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py index 42438b3..fdc8bbc 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -252,9 +252,6 @@ class Configuration(object): self.config.available_features.add('with_system_cxx_lib={}{}'.format(sysname, version)) self.config.available_features.add('with_system_cxx_lib={}'.format(sysname)) - self.config.available_features.add('availability={}'.format(sysname)) - self.config.available_features.add('availability={}{}'.format(sysname, version)) - if self.target_info.is_windows(): if self.cxx_stdlib_under_test == 'libc++': # LIBCXX-WINDOWS-FIXME is the feature name used to XFAIL the