[libcxx-commits] [libcxx] f980ed4 - [libcxx] Remove the 'availability' Lit feature

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 11 08:35:32 PDT 2020


Author: Louis Dionne
Date: 2020-09-11T11:34:49-04:00
New Revision: f980ed4184f9d9139961e21739d7692ea86b0ccf

URL: https://github.com/llvm/llvm-project/commit/f980ed4184f9d9139961e21739d7692ea86b0ccf
DIFF: https://github.com/llvm/llvm-project/commit/f980ed4184f9d9139961e21739d7692ea86b0ccf.diff

LOG: [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.

Added: 
    libcxx/test/libcxx/language.support/support.dynamic/aligned_alloc_availability.verify.cpp
    libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp

Modified: 
    libcxx/docs/DesignDocs/AvailabilityMarkup.rst
    libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
    libcxx/test/libcxx/thread/atomic.availability.verify.cpp
    libcxx/test/libcxx/thread/barrier.availability.verify.cpp
    libcxx/test/libcxx/thread/latch.availability.verify.cpp
    libcxx/test/libcxx/thread/semaphore.availability.verify.cpp
    libcxx/test/libcxx/utilities/charconv/charconv.to.chars/availability.fail.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.pass.cpp
    libcxx/utils/libcxx/test/config.py

Removed: 
    libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp


################################################################################
diff  --git a/libcxx/docs/DesignDocs/AvailabilityMarkup.rst b/libcxx/docs/DesignDocs/AvailabilityMarkup.rst
index 2380385392876..26975a7370683 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 0000000000000..aa75b70adee6b
--- /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 <new>
+#include <cstddef>
+
+#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 at -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 at -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 at -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 at -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 6ed7e7536bb7d..0d67cdafadd8e 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 749c9470c3063..4b5a47ee0e4bd 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 <new>
 
@@ -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 45028da5281a8..643e5910cc52c 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 <atomic>.

diff  --git a/libcxx/test/libcxx/thread/barrier.availability.verify.cpp b/libcxx/test/libcxx/thread/barrier.availability.verify.cpp
index 16d67fbce7b7b..f8537f5e86b43 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 f468ebfe9f4ab..25a1610541d43 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 5d92461c0a000..284ee96f567f1 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 cd099420d1829..70f5d3c1808d7 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 b092fa141e611..eb7f5ad4aafd1 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 bfa5f155a9c56..6b372e076915a 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 869e29a8e87be..e9e9d95e83a3c 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 6f346a72a0ae6..e7a1e403d73dd 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 cdebcda46a0b7..1274ddff54236 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 f50507a815d43..4d0100d04597d 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 80ec88e437fe0..01cb88658954e 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 0a42fbac6fd4c..930eff95bb999 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 655ec9352d682..62ceafb7644af 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 e827ff618ec5a..22ea35ebced97 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 42438b3ccf2e7..fdc8bbce1cf18 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -252,9 +252,6 @@ def configure_features(self):
             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


        


More information about the libcxx-commits mailing list