[libcxx-commits] [libcxx] [libc++] Optimize vector::erase (PR #213916)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 4 05:06:03 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 ,cpp,h -- libcxx/include/__expected/expected.h libcxx/include/__memory/uninitialized_algorithms.h libcxx/include/__memory/unique_ptr.h libcxx/include/__optional/optional.h libcxx/include/__optional/optional_ref.h libcxx/include/__split_buffer libcxx/include/__utility/pair.h libcxx/include/__vector/layout.h libcxx/include/__vector/vector.h libcxx/include/array libcxx/include/deque libcxx/include/string libcxx/include/tuple libcxx/include/variant libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp libcxx/test/std/containers/sequences/vector/vector.modifiers/common.h libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp libcxx/include/__type_traits/is_relocatable.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/string b/libcxx/include/string
index 3ac8e541d..280e71183 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -934,7 +934,7 @@ private:
     return std::__make_bounded_iter(__p, __get_pointer(), __get_pointer() + size());
 #  else
     return const_iterator(__p);
-#  endif                    // _LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING
+#  endif // _LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING
   }
 
 public:

``````````

</details>


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


More information about the libcxx-commits mailing list