[libcxx-commits] [libcxx] [libc++] Fix name of is_always_lock_free test which was never being run (PR #106077)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 27 05:55:03 PDT 2024
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/106077
>From 29d8dd09b64c9749a7a34eb2e170df1f1bc26ce7 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 26 Aug 2024 11:54:51 -0400
Subject: [PATCH] [libc++] Fix name of is_always_lock_free test which was never
being run
---
...is_always_lock_free.cpp => is_always_lock_free.pass.cpp} | 6 ++++++
1 file changed, 6 insertions(+)
rename libcxx/test/std/atomics/atomics.lockfree/{is_always_lock_free.cpp => is_always_lock_free.pass.cpp} (97%)
diff --git a/libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.cpp b/libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.pass.cpp
similarity index 97%
rename from libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.cpp
rename to libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.pass.cpp
index db17221e515d3a..4d761cec992c66 100644
--- a/libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.cpp
+++ b/libcxx/test/std/atomics/atomics.lockfree/is_always_lock_free.pass.cpp
@@ -96,6 +96,11 @@ void test() {
CHECK_ALWAYS_LOCK_FREE(double);
CHECK_ALWAYS_LOCK_FREE(long double);
#if __has_attribute(vector_size) && defined(_LIBCPP_VERSION)
+ // Ignore diagnostic about vector types changing the ABI on some targets, since
+ // that is irrelevant for this test.
+ TEST_DIAGNOSTIC_PUSH
+ TEST_CLANG_DIAGNOSTIC_IGNORED("-Wpsabi")
+ TEST_GCC_DIAGNOSTIC_IGNORED("-Wpsabi")
CHECK_ALWAYS_LOCK_FREE(int __attribute__((vector_size(1 * sizeof(int)))));
CHECK_ALWAYS_LOCK_FREE(int __attribute__((vector_size(2 * sizeof(int)))));
CHECK_ALWAYS_LOCK_FREE(int __attribute__((vector_size(4 * sizeof(int)))));
@@ -111,6 +116,7 @@ void test() {
CHECK_ALWAYS_LOCK_FREE(double __attribute__((vector_size(4 * sizeof(double)))));
CHECK_ALWAYS_LOCK_FREE(double __attribute__((vector_size(16 * sizeof(double)))));
CHECK_ALWAYS_LOCK_FREE(double __attribute__((vector_size(32 * sizeof(double)))));
+ TEST_DIAGNOSTIC_POP
#endif // __has_attribute(vector_size) && defined(_LIBCPP_VERSION)
CHECK_ALWAYS_LOCK_FREE(struct Empty{});
CHECK_ALWAYS_LOCK_FREE(struct OneInt { int i; });
More information about the libcxx-commits
mailing list