[libcxx-commits] [libcxx] 07fdc08 - [libc++] Add missing check for C++17 in test

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 22 13:44:10 PST 2023


Author: Louis Dionne
Date: 2023-11-22T16:44:01-05:00
New Revision: 07fdc084fe75f971688d4140a5bd2dcb1d60eba2

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

LOG: [libc++] Add missing check for C++17 in test

This was never caught on our bots because this specific test is marked
as `XFAIL: !is-lockfree-runtime-function`, which is the case on our bots.

Added: 
    

Modified: 
    libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp
index 39fa837f4807bf6..2cc7a8a0760d03e 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp
@@ -30,8 +30,10 @@ struct TestFn {
 
     A a(t);
     bool b1 = std::atomic_is_lock_free(static_cast<const A*>(&a));
+#if TEST_STD_VER >= 17
     if (A::is_always_lock_free)
       assert(b1);
+#endif
 
     volatile A va(t);
     bool b2 = std::atomic_is_lock_free(static_cast<const volatile A*>(&va));


        


More information about the libcxx-commits mailing list