aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test
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
commit4d3366e257ac4a98f25db0bf3c7276f6609875d7 (patch)
tree29f5f6421fa80173ddd84b7d09a9876787894954 /libcxx/test
parentf341abba39db94928cba8acd5dc63fb9f1ac47db (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 llvm-svn: 350649
Diffstat (limited to 'libcxx/test')
-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 0e28d61ef6ff..414a75b33df3 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 5390bef3e22c..368076dee3ad 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>