[libcxx-commits] [libcxx] [libc++][NFC] Use TestEachPointerType in TestEachAtomicType (PR #91480)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 8 07:41:22 PDT 2024


https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/91480

That way, if we ever expand TestEachPointerType we will pick up those changes in TestEachAtomicType.

>From 5113bf8d7252262d2ea906ad830e01b5f4946556 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 8 May 2024 10:40:36 -0400
Subject: [PATCH] [libc++][NFC] Use TestEachPointerType in TestEachAtomicType

That way, if we ever expand TestEachPointerType we will pick up those
changes in TestEachAtomicType.
---
 libcxx/test/support/atomic_helpers.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libcxx/test/support/atomic_helpers.h b/libcxx/test/support/atomic_helpers.h
index 9a32b1ffe85e4..0266a0961067b 100644
--- a/libcxx/test/support/atomic_helpers.h
+++ b/libcxx/test/support/atomic_helpers.h
@@ -116,6 +116,7 @@ template <template <class TestArg> class TestFunctor>
 struct TestEachAtomicType {
   void operator()() const {
     TestEachIntegralType<TestFunctor>()();
+    TestEachPointerType<TestFunctor>()();
     TestFunctor<UserAtomicType>()();
     /*
             Note: These aren't going to be lock-free,
@@ -128,8 +129,6 @@ struct TestEachAtomicType {
         TestFunctor<PaddedUserAtomicType>()();
         TestFunctor<WeirdUserAtomicType>()();
 */
-    TestFunctor<int*>()();
-    TestFunctor<const int*>()();
     TestFunctor<float>()();
     TestFunctor<double>()();
   }



More information about the libcxx-commits mailing list