[libcxx-commits] [libcxx] [libc++][modules] Refactor poisoned_hash_helper (PR #108296)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 11 14:39:22 PDT 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 118f120eaab8d763b28c71f0d2e2c1e0c752832b c5a811d5e42fb8fab6596c929060e0145bd6a758 --extensions ,h,cpp -- libcxx/include/type_traits libcxx/test/std/containers/sequences/vector.bool/enabled_hash.pass.cpp libcxx/test/std/diagnostics/syserr/syserr.hash/enabled_hash.pass.cpp libcxx/test/std/experimental/memory/memory.observer.ptr/hash.pass.cpp libcxx/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp libcxx/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp libcxx/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_shared_ptr.pass.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp libcxx/test/std/utilities/template.bitset/bitset.hash/enabled_hash.pass.cpp libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp libcxx/test/support/poisoned_hash_helper.h
``````````

</details>

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

``````````diff
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp
index 98caff9049..a4b1155611 100644
--- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp
+++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp
@@ -23,9 +23,7 @@
 
 int main(int, char**) {
   test_library_hash_specializations_available();
-  {
-    test_hash_enabled<std::thread::id>();
-  }
+  { test_hash_enabled<std::thread::id>(); }
 
   return 0;
 }
diff --git a/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp
index 9c0de17837..8a6a48f0e2 100644
--- a/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp
+++ b/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp
@@ -33,9 +33,7 @@ int main(int, char**)
 #endif
   }
 #if TEST_STD_VER >= 11
-  {
-    test_hash_enabled<std::type_index>(std::type_index(typeid(int)));
-  }
+  { test_hash_enabled<std::type_index>(std::type_index(typeid(int))); }
 #endif
 
   return 0;
diff --git a/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp b/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp
index 656b1d83c5..0fc2f37807 100644
--- a/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp
+++ b/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp
@@ -102,9 +102,7 @@ void test_hash_monostate() {
     ASSERT_NOEXCEPT(h(m1));
     static_assert(std::is_copy_constructible<H>::value, "");
   }
-  {
-    test_hash_enabled<std::monostate>();
-  }
+  { test_hash_enabled<std::monostate>(); }
 }
 
 void test_hash_variant_duplicate_elements() {

``````````

</details>


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


More information about the libcxx-commits mailing list