[libcxx-commits] [libcxx] e37c985 - [libc++] Fix typo in atomic.h comment (#182719)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 22 17:43:09 PST 2026


Author: Connector Switch
Date: 2026-02-23T09:43:04+08:00
New Revision: e37c985ba09d424a1c8b553a8c511b18f437d386

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

LOG: [libc++] Fix typo in atomic.h comment (#182719)

Added: 
    

Modified: 
    libcxx/include/__atomic/atomic.h

Removed: 
    


################################################################################
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(ptr
diff _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(ptr
diff _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