summaryrefslogtreecommitdiff
path: root/libcxx
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-01-08 20:26:56 +0000
committerLouis Dionne <ldionne@apple.com>2019-01-08 20:26:56 +0000
commitf89082375059bb8941137af42feaaa10499b5904 (patch)
treeb88d621761ddb1110297a928642d810526db4ea5 /libcxx
parent0c36c9bcb60d561b94898caf92253db55bacf91e (diff)
[Sema] Teach Clang that aligned allocation is not supported with macosx10.13
Summary: r306722 added diagnostics when aligned allocation is used with deployment targets that do not support it, but the first macosx supporting aligned allocation was incorrectly set to 10.13. In reality, the dylib shipped with macosx10.13 does not support aligned allocation, but the dylib shipped with macosx10.14 does. Reviewers: ahatanak Subscribers: christof, jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D56445
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp8
-rw-r--r--libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp19
2 files changed, 18 insertions, 9 deletions
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 0e28d61ef6f..414a75b33df 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
@@ -14,9 +14,15 @@
// definitions, which does not yet provide aligned allocation
// XFAIL: LIBCXX-WINDOWS-FIXME
-// Clang 10 (and older) will trigger an availability error when the deployment
+// AppleClang 10 (and older) will trigger an availability error when the deployment
// target does not support aligned allocation, even if we pass `-faligned-allocation`.
+// XFAIL: apple-clang-10 && availability=macosx10.13
// XFAIL: apple-clang-10 && availability=macosx10.12
+// XFAIL: apple-clang-10 && availability=macosx10.11
+// XFAIL: apple-clang-10 && availability=macosx10.10
+// XFAIL: apple-clang-10 && availability=macosx10.9
+// XFAIL: apple-clang-10 && availability=macosx10.8
+// XFAIL: apple-clang-10 && availability=macosx10.7
// The dylibs shipped before macosx10.14 do not contain the aligned allocation
// functions, so trying to force using those with -faligned-allocation results
diff --git a/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp b/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp
index 5390bef3e22..368076dee3a 100644
--- a/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp
+++ b/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp
@@ -9,14 +9,17 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// Aligned allocation functions are not provided prior to macosx10.13, but
-// AppleClang <= 10 does not know about this restriction and always enables them.
-// 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
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.8
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.7
+// AppleClang <= 10 enables aligned allocation regardless of the deployment
+// target, so this test would fail.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+
+// XFAIL: availability=macosx10.13
+// XFAIL: availability=macosx10.12
+// XFAIL: availability=macosx10.11
+// XFAIL: availability=macosx10.10
+// XFAIL: availability=macosx10.9
+// XFAIL: availability=macosx10.8
+// XFAIL: availability=macosx10.7
#include <new>