[libcxx-commits] [libcxx] [libc++] Fix typo in atomic.h comment (PR #182719)
Connector Switch via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Feb 21 19:32:38 PST 2026
https://github.com/c8ef created https://github.com/llvm/llvm-project/pull/182719
None
>From 728a684dae19c2171c8f3d078434f71527e0b82c Mon Sep 17 00:00:00 2001
From: c8ef <c8ef at outlook.com>
Date: Sun, 22 Feb 2026 11:32:02 +0800
Subject: [PATCH] [libc++] Fix typo in atomic.h comment
---
libcxx/include/__atomic/atomic.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcxx/include/__atomic/atomic.h b/libcxx/include/__atomic/atomic.h
index ea1d28fbf850a..3d0ed9cc47396 100644
--- a/libcxx/include/__atomic/atomic.h
+++ b/libcxx/include/__atomic/atomic.h
@@ -295,13 +295,13 @@ struct atomic<_Tp*> : public __atomic_base<_Tp*> {
}
_LIBCPP_HIDE_FROM_ABI _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
- // __atomic_fetch_add accepts function pointers, guard against them.
+ // __atomic_fetch_sub accepts function pointers, guard against them.
static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return std::__cxx_atomic_fetch_sub(std::addressof(this->__a_), __op, __m);
}
_LIBCPP_HIDE_FROM_ABI _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
- // __atomic_fetch_add accepts function pointers, guard against them.
+ // __atomic_fetch_sub accepts function pointers, guard against them.
static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return std::__cxx_atomic_fetch_sub(std::addressof(this->__a_), __op, __m);
}
More information about the libcxx-commits
mailing list