[libcxx-commits] [libcxx] dccc742 - [libc++][test] atomic<T> requires trivially copyable T

Casey Carter via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 19 17:13:40 PDT 2020


Author: Casey Carter
Date: 2020-10-19T17:13:18-07:00
New Revision: dccc742c2257159abec6b287223bb159bbf4b91c

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

LOG: [libc++][test] atomic<T> requires trivially copyable T

The author of these tests apparently forgot that `atomic_{,un}signed_lock_free` are already specializations of `atomic`.

Added: 
    

Modified: 
    libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
    libcxx/test/std/atomics/types.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
index 8dd8c345592b..d9e09641dc4b 100644
--- a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
@@ -136,8 +136,8 @@ void run()
     static_assert(std::atomic<std::nullptr_t>::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE), "");
 
 #if TEST_STD_VER >= 20
-    static_assert(std::atomic<std::atomic_signed_lock_free>::is_always_lock_free, "");
-    static_assert(std::atomic<std::atomic_unsigned_lock_free>::is_always_lock_free, "");
+    static_assert(std::atomic_signed_lock_free::is_always_lock_free, "");
+    static_assert(std::atomic_unsigned_lock_free::is_always_lock_free, "");
 #endif
 }
 

diff  --git a/libcxx/test/std/atomics/types.pass.cpp b/libcxx/test/std/atomics/types.pass.cpp
index 891bbbbd6d51..4fc2c6c22a7b 100644
--- a/libcxx/test/std/atomics/types.pass.cpp
+++ b/libcxx/test/std/atomics/types.pass.cpp
@@ -169,8 +169,8 @@ int main(int, char**)
     test<float>();
 
 #if TEST_STD_VER >= 20
-    test<std::atomic_signed_lock_free>();
-    test<std::atomic_unsigned_lock_free>();
+    test<std::atomic_signed_lock_free::value_type>();
+    test<std::atomic_unsigned_lock_free::value_type>();
 /*
     test<std::shared_ptr<int>>();
 */


        


More information about the libcxx-commits mailing list