[libcxx-commits] [libcxx] [libc++][atomic] P2835R7: Expose `std::atomic_ref`'s object address (PR #162236)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 7 00:34:13 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- libcxx/test/std/atomics/atomics.ref/address.pass.cpp libcxx/include/__atomic/atomic_ref.h
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__atomic/atomic_ref.h b/libcxx/include/__atomic/atomic_ref.h
index eb3ee7f5d..1b5191ebb 100644
--- a/libcxx/include/__atomic/atomic_ref.h
+++ b/libcxx/include/__atomic/atomic_ref.h
@@ -220,9 +220,9 @@ public:
}
_LIBCPP_HIDE_FROM_ABI void notify_one() const noexcept { std::__atomic_notify_one(*this); }
_LIBCPP_HIDE_FROM_ABI void notify_all() const noexcept { std::__atomic_notify_all(*this); }
-#if _LIBCPP_STD_VER >= 26
+# if _LIBCPP_STD_VER >= 26
_LIBCPP_HIDE_FROM_ABI constexpr _Tp* address() const noexcept { return __ptr_; }
-#endif
+# endif
protected:
using _Aligned_Tp [[__gnu__::__aligned__(required_alignment), __gnu__::__nodebug__]] = _Tp;
``````````
</details>
https://github.com/llvm/llvm-project/pull/162236
More information about the libcxx-commits
mailing list