[libcxx-commits] [libcxx] [libc++] Require fancy pointer to be correctly convertible (PR #152989)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 11 03:23:29 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 HEAD~1 HEAD --extensions ,h -- libcxx/include/__hash_table libcxx/include/__memory/pointer_traits.h libcxx/include/__tree libcxx/include/forward_list libcxx/test/support/min_allocator.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index b804a542b..92377d6bf 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -2078,9 +2078,8 @@ __tree<_Tp, _Compare, _Allocator>::__count_multi(const _Key& __k) const {
     } else if (value_comp()(__rt->__value_, __k))
       __rt = static_cast<__node_pointer>(__rt->__right_);
     else
-      return std::distance(
-          __lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), __rt),
-          __upper_bound(__k, static_cast<__node_pointer>(__rt->__right_), __result));
+      return std::distance(__lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), __rt),
+                           __upper_bound(__k, static_cast<__node_pointer>(__rt->__right_), __result));
   }
   return 0;
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/152989


More information about the libcxx-commits mailing list