[libcxx-commits] [libcxx] 0dcb370 - [libcxx][test] Disable bad unique_ptr<T[]> to shared_ptr<U[]> conversion test cases
Casey Carter via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 8 14:57:08 PST 2022
Author: Casey Carter
Date: 2022-02-08T14:56:47-08:00
New Revision: 0dcb370d43012a25f28295010ec3e8d3362e3e52
URL: https://github.com/llvm/llvm-project/commit/0dcb370d43012a25f28295010ec3e8d3362e3e52
DIFF: https://github.com/llvm/llvm-project/commit/0dcb370d43012a25f28295010ec3e8d3362e3e52.diff
LOG: [libcxx][test] Disable bad unique_ptr<T[]> to shared_ptr<U[]> conversion test cases
for non-libc++. I've reported allowance of these conversions as a bug at https://llvm.org/PR53368.
Differential Revision: https://reviews.llvm.org/D117996
Added:
Modified:
libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
index f9e1798d8a7a6..3063e776178f4 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
@@ -125,6 +125,7 @@ int main(int, char**)
assert(B::count == 0);
assert(A::count == 0);
+#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
{
std::unique_ptr<A[]> ptr(new A[8]);
A* raw_ptr = ptr.get();
@@ -156,6 +157,7 @@ int main(int, char**)
std::shared_ptr<int> p;
p = std::move(ptr);
}
+#endif // _LIBCPP_VERSION
#if TEST_STD_VER > 14
{
@@ -169,6 +171,7 @@ int main(int, char**)
assert(A::count == 0);
assert(B::count == 0);
+#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
{
std::unique_ptr<A[]> ptr(new A[8]);
A* raw_ptr = ptr.get();
@@ -182,6 +185,7 @@ int main(int, char**)
}
assert(A::count == 0);
assert(B::count == 0);
+#endif // _LIBCPP_VERSION
{
std::unique_ptr<A[]> ptr(new A[8]);
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
index ad88a3e8a7dfc..ef0b9102c6cda 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
@@ -149,6 +149,7 @@ int main(int, char**)
}
assert(A::count == 0);
+#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
{
std::unique_ptr<A[]> ptr(new A[8]);
A* raw_ptr = ptr.get();
@@ -177,6 +178,7 @@ int main(int, char**)
std::unique_ptr<int[]> ptr(new int[8]);
std::shared_ptr<int> p(std::move(ptr));
}
+#endif // _LIBCPP_VERSION
#if TEST_STD_VER > 14
{
@@ -189,6 +191,7 @@ int main(int, char**)
assert(A::count == 0);
assert(B::count == 0);
+#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
{
std::unique_ptr<A[]> ptr(new A[8]);
A* raw_ptr = ptr.get();
@@ -201,6 +204,7 @@ int main(int, char**)
}
assert(A::count == 0);
assert(B::count == 0);
+#endif // _LIBCPP_VERSION
{
std::unique_ptr<A[]> ptr(new A[8]);
More information about the libcxx-commits
mailing list