[libcxx-commits] [libcxx] [libc++] Reorder shared_ptr allocation functions (PR #206031)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 26 03:59:32 PDT 2026
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 h -- libcxx/include/__memory/shared_ptr.h --diff_from_common_commit
``````````
: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/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index 269c86007..a29ec1a4e 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -654,9 +654,9 @@ _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> __allocate_shared_impl(const _Alloc& __all
template <class _Tp, class _Alloc>
struct _LIBCPP_HIDE_STRUCT_FROM_ABI __shared_ptr_emplace : __shared_weak_count {
- using __alloc_t _LIBCPP_NODEBUG = __allocator_traits_rebind_t<_Alloc, __shared_ptr_emplace>;
+ using __alloc_t _LIBCPP_NODEBUG = __allocator_traits_rebind_t<_Alloc, __shared_ptr_emplace>;
using __alloc_traits _LIBCPP_NODEBUG = allocator_traits<__alloc_t>;
- using __value_type _LIBCPP_NODEBUG = __remove_cv_t<_Tp>;
+ using __value_type _LIBCPP_NODEBUG = __remove_cv_t<_Tp>;
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI explicit __shared_ptr_emplace(_Alloc __a, _Args&&... __args) : __alloc_(std::move(__a)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/206031
More information about the libcxx-commits
mailing list