[libcxx-commits] [libcxx] [libc++] Optimize multi{map, set}::insert (PR #152691)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 8 04:30:15 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  -- libcxx/include/__tree libcxx/include/map libcxx/include/set
``````````

</details>

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

``````````diff
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index fb8f084a7..54538a269 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -1001,7 +1001,7 @@ public:
       return;
 
     if (__root() == nullptr) { // Make sure we always have a root node
-      __node_holder __node = __construct_node(*__first);
+      __node_holder __node  = __construct_node(*__first);
       __end_node()->__left_ = static_cast<__node_base_pointer>(__node.release());
       __insert_node_at(__end_node(), __end_node()->__left_);
       ++__first;

``````````

</details>


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


More information about the libcxx-commits mailing list