[libcxx-commits] [libcxx] [libcxx] Avoid hash key in __hash_table::find() if no buckets yet. (PR #126837)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 13 02:48:37 PST 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 9fdb0633051121af24dfa00e8a762df10138ecc3 a2f7b3c549b63ce9669c025c863980da27481b50 --extensions ,cpp -- libcxx/test/benchmarks/containers/associative/hash_table_find.bench.cpp libcxx/include/__hash_table
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/benchmarks/containers/associative/hash_table_find.bench.cpp b/libcxx/test/benchmarks/containers/associative/hash_table_find.bench.cpp
index e6f0ae79ca..93fddac02e 100644
--- a/libcxx/test/benchmarks/containers/associative/hash_table_find.bench.cpp
+++ b/libcxx/test/benchmarks/containers/associative/hash_table_find.bench.cpp
@@ -50,7 +50,7 @@ static void BM_UnorderedSet_Find_EmptySet(benchmark::State& state, Gen g) {
template <class Gen>
static void BM_UnorderedSet_Find(benchmark::State& state, Gen g) {
const size_t lookup_count = state.range(0);
- std::unordered_set<std::string> s{"hello"}; // Non-empty set
+ std::unordered_set<std::string> s{"hello"}; // Non-empty set
for (auto _ : state) {
for (size_t i = 0; i < lookup_count; i++) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/126837
More information about the libcxx-commits
mailing list