Skip to content

[libc++][NFC] Use TestEachPointerType in TestEachAtomicType #91480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented May 8, 2024

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

That way, if we ever expand TestEachPointerType we will pick up those
changes in TestEachAtomicType.
@ldionne ldionne requested a review from a team as a code owner May 8, 2024 14:41
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label May 8, 2024
@llvmbot
Copy link
Member

llvmbot commented May 8, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/91480.diff

1 Files Affected:

  • (modified) libcxx/test/support/atomic_helpers.h (+1-2)
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>()();
   }

@ldionne ldionne merged commit 9232591 into llvm:main May 10, 2024
@ldionne ldionne deleted the review/atomic-test-each-pointer-type branch May 10, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants