[libcxx-commits] [PATCH] D117996: [libcxx][test] Disable bad unique_ptr<T[]> to shared_ptr<U[]> conversion test cases

Casey Carter via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 8 14:57:14 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0dcb370d4301: [libcxx][test] Disable bad unique_ptr<T[]> to shared_ptr<U[]> conversion test… (authored by CaseyCarter).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117996/new/

https://reviews.llvm.org/D117996

Files:
  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


Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
===================================================================
--- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
+++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
@@ -149,6 +149,7 @@
     }
 
     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 @@
       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 @@
     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 @@
     }
     assert(A::count == 0);
     assert(B::count == 0);
+#endif // _LIBCPP_VERSION
 
     {
       std::unique_ptr<A[]> ptr(new A[8]);
Index: 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.assign/unique_ptr_Y.pass.cpp
+++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
@@ -125,6 +125,7 @@
     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 @@
       std::shared_ptr<int> p;
       p = std::move(ptr);
     }
+#endif // _LIBCPP_VERSION
 
 #if TEST_STD_VER > 14
     {
@@ -169,6 +171,7 @@
     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 @@
     }
     assert(A::count == 0);
     assert(B::count == 0);
+#endif // _LIBCPP_VERSION
 
     {
       std::unique_ptr<A[]> ptr(new A[8]);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117996.406985.patch
Type: text/x-patch
Size: 2336 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220208/bce63c0e/attachment.bin>


More information about the libcxx-commits mailing list