[libcxx-commits] [libcxx] Reapply "[libc++] Optimize vector growing of trivially relocatable types" (PR #80558)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 3 11:35:23 PST 2024


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 7a94acb2da5b20d12f13f3c5f4eb0f3f46e78e73 4b11f38258e250775e0ca7016fcb8640bf8f037f -- libcxx/include/__type_traits/is_trivially_relocatable.h libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp libcxx/test/std/containers/sequences/vector/vector.modifiers/destory_elements.pass.cpp libcxx/benchmarks/ContainerBenchmarks.h libcxx/benchmarks/vector_operations.bench.cpp libcxx/include/__memory/uninitialized_algorithms.h libcxx/include/__memory/unique_ptr.h libcxx/include/string libcxx/include/vector libcxx/test/support/count_new.h
``````````

</details>

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

``````````diff
diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/destory_elements.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/destory_elements.pass.cpp
index 93c7cd652c..7690004cf7 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/destory_elements.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/destory_elements.pass.cpp
@@ -21,7 +21,7 @@ struct DestroyTracker {
     vec.emplace_back(false);
   }
 
-  TEST_CONSTEXPR_CXX20 DestroyTracker(const DestroyTracker& other) : vec_(other.vec_), index_(vec_ -> size()) {
+  TEST_CONSTEXPR_CXX20 DestroyTracker(const DestroyTracker& other) : vec_(other.vec_), index_(vec_->size()) {
     vec_->emplace_back(false);
   }
 

``````````

</details>


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


More information about the libcxx-commits mailing list