[libcxx-commits] [libcxx] Optimize __assign_with_sentinel in std::vector (PR #113852)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 12 08:07:52 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 99f44c8fed5b538ab37c4227d9059a65450b68de 87f94b9cb794888052b19ad2e8630f9c79a56693 --extensions cpp,h -- libcxx/include/__vector/vector.h libcxx/test/benchmarks/ContainerBenchmarks.h libcxx/test/benchmarks/GenerateInput.h libcxx/test/benchmarks/vector_operations.bench.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/benchmarks/ContainerBenchmarks.h b/libcxx/test/benchmarks/ContainerBenchmarks.h
index 111c2485ef..3ec4d47fae 100644
--- a/libcxx/test/benchmarks/ContainerBenchmarks.h
+++ b/libcxx/test/benchmarks/ContainerBenchmarks.h
@@ -67,7 +67,7 @@ template <class Container,
class GenInputs,
typename std::enable_if<!std::is_trivial<typename Container::value_type>::value>::type* = nullptr>
void BM_AssignInputIterIter(benchmark::State& st, Container c, GenInputs gen) {
- auto v = gen(1, 100);
+ auto v = gen(1, 100);
c.resize(st.range(0), v[0]);
auto in = gen(st.range(1), 32);
benchmark::DoNotOptimize(&in);
``````````
</details>
https://github.com/llvm/llvm-project/pull/113852
More information about the libcxx-commits
mailing list