[libcxx-commits] [libcxx] [libc++][NFC] Avoid opening namespace std in the tests (PR #94160)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 2 06:40:05 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 daaaf4e9009edf38dfc3d01d3c30de0827ffd1b5 94858463488d612c130d67fda4d2a04896aedb04 -- libcxx/test/libcxx/utilities/any/allocator.pass.cpp libcxx/test/libcxx/utilities/format/enable_insertable.compile.pass.cpp libcxx/test/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp libcxx/test/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp libcxx/test/std/containers/Emplaceable.h libcxx/test/std/containers/NotConstructible.h libcxx/test/std/containers/container.node/node_handle.pass.cpp libcxx/test/std/containers/unord/unord.map/compare.pass.cpp libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp libcxx/test/std/diagnostics/syserr/is_error_code_enum.pass.cpp libcxx/test/std/diagnostics/syserr/is_error_condition_enum.pass.cpp libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/ErrorCodeEnum.pass.cpp libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/lwg3629.pass.cpp libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/ErrorCodeEnum.pass.cpp libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/lwg3629.pass.cpp libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/lwg3629.pass.cpp libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/lwg3629.pass.cpp libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/indirectly_readable.compile.pass.cpp libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/user_defined_char_type.pass.cpp libcxx/test/std/ranges/range.utility/range.subrange/ctor.range_size.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp libcxx/test/std/time/rep.h libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_reference.compile.pass.cpp libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_like.pass.cpp libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp libcxx/test/std/utilities/variant/variant.visit.member/visit.pass.cpp libcxx/test/std/utilities/variant/variant.visit/visit.pass.cpp libcxx/test/support/Counter.h
``````````

</details>

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

``````````diff
diff --git a/libcxx/test/libcxx/utilities/any/allocator.pass.cpp b/libcxx/test/libcxx/utilities/any/allocator.pass.cpp
index 009a4ebed6..eab3ca8826 100644
--- a/libcxx/test/libcxx/utilities/any/allocator.pass.cpp
+++ b/libcxx/test/libcxx/utilities/any/allocator.pass.cpp
@@ -41,19 +41,19 @@ bool Small_was_destroyed = false;
 
 template <>
 struct std::allocator<Large> {
-  using value_type = Large;
-  using size_type = std::size_t;
-  using difference_type = std::ptrdiff_t;
+  using value_type                             = Large;
+  using size_type                              = std::size_t;
+  using difference_type                        = std::ptrdiff_t;
   using propagate_on_container_move_assignment = std::true_type;
-  using is_always_equal = std::true_type;
+  using is_always_equal                        = std::true_type;
 
   Large* allocate(std::size_t n) {
     Large_was_allocated = true;
     return static_cast<Large*>(::operator new(n * sizeof(Large)));
   }
 
-  template <typename ...Args>
-  void construct(Large* p, Args&& ...args) {
+  template <typename... Args>
+  void construct(Large* p, Args&&... args) {
     new (p) Large(std::forward<Args>(args)...);
     Large_was_constructed = true;
   }
@@ -71,16 +71,19 @@ struct std::allocator<Large> {
 
 template <>
 struct std::allocator<Small> {
-  using value_type = Small;
-  using size_type = std::size_t;
-  using difference_type = std::ptrdiff_t;
+  using value_type                             = Small;
+  using size_type                              = std::size_t;
+  using difference_type                        = std::ptrdiff_t;
   using propagate_on_container_move_assignment = std::true_type;
-  using is_always_equal = std::true_type;
+  using is_always_equal                        = std::true_type;
 
-  Small* allocate(std::size_t) { assert(false); return nullptr; }
+  Small* allocate(std::size_t) {
+    assert(false);
+    return nullptr;
+  }
 
-  template <typename ...Args>
-  void construct(Small* p, Args&& ...args) {
+  template <typename... Args>
+  void construct(Small* p, Args&&... args) {
     new (p) Small(std::forward<Args>(args)...);
     Small_was_constructed = true;
   }
@@ -93,7 +96,6 @@ struct std::allocator<Small> {
   void deallocate(Small*, std::size_t) { assert(false); }
 };
 
-
 int main(int, char**) {
   // Test large types
   {
diff --git a/libcxx/test/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp b/libcxx/test/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp
index 91d060e37f..d72df6dbb3 100644
--- a/libcxx/test/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp
+++ b/libcxx/test/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp
@@ -715,124 +715,94 @@ template <>
 struct std::common_type<int&, CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<CommonWithInt&, const int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<CommonWithInt&, const int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<int&, const CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<int&, const CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<CommonWithInt&, volatile int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<CommonWithInt&, volatile int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<int&, volatile CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<int&, volatile CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<CommonWithInt&, const volatile int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<CommonWithInt&, const volatile int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<int&, const volatile CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<int&, const volatile CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const CommonWithInt&, int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const CommonWithInt&, int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const int&, CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const int&, CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const CommonWithInt&, const int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const CommonWithInt&, const int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const int&, const CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const int&, const CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const CommonWithInt&, volatile int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const CommonWithInt&, volatile int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const int&, volatile CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const int&, volatile CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const CommonWithInt&, const volatile int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const CommonWithInt&, const volatile int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const int&, const volatile CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const int&, const volatile CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<volatile CommonWithInt&, int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<volatile CommonWithInt&, int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<volatile int&, CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<volatile int&, CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<volatile CommonWithInt&, const int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<volatile CommonWithInt&, const int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<volatile int&, const CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<volatile int&, const CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<volatile CommonWithInt&, volatile int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<volatile CommonWithInt&, volatile int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<volatile int&, volatile CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<volatile int&, volatile CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<volatile CommonWithInt&, const volatile int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<volatile CommonWithInt&, const volatile int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<volatile int&, const volatile CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<volatile int&, const volatile CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const volatile CommonWithInt&, int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const volatile CommonWithInt&, int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const volatile int&, CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const volatile int&, CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const volatile CommonWithInt&, const int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const volatile CommonWithInt&, const int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const volatile int&, const CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const volatile int&, const CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const volatile CommonWithInt&, volatile int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const volatile CommonWithInt&, volatile int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const volatile int&, volatile CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const volatile int&, volatile CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const volatile CommonWithInt&, const volatile int&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const volatile CommonWithInt&, const volatile int&> : std::common_type<CommonWithInt, int> {};
 
 template <>
-struct std::common_type<const volatile int&, const volatile CommonWithInt&>
-    : std::common_type<CommonWithInt, int> {};
+struct std::common_type<const volatile int&, const volatile CommonWithInt&> : std::common_type<CommonWithInt, int> {};
 
 static_assert(CheckCommonWith<CommonWithInt, int>());
 
@@ -846,8 +816,7 @@ struct std::common_type<CommonWithIntButRefLong, int> {
 };
 
 template <>
-struct std::common_type<int, CommonWithIntButRefLong>
-    : std::common_type<CommonWithIntButRefLong, int> {};
+struct std::common_type<int, CommonWithIntButRefLong> : std::common_type<CommonWithIntButRefLong, int> {};
 
 template <>
 struct std::common_type<CommonWithIntButRefLong&, int&> {
@@ -855,24 +824,19 @@ struct std::common_type<CommonWithIntButRefLong&, int&> {
 };
 
 template <>
-struct std::common_type<int&, CommonWithIntButRefLong&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<int&, CommonWithIntButRefLong&> : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
-struct std::common_type<CommonWithIntButRefLong&, const int&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<CommonWithIntButRefLong&, const int&> : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
-struct std::common_type<int&, const CommonWithIntButRefLong&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<int&, const CommonWithIntButRefLong&> : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
-struct std::common_type<CommonWithIntButRefLong&, volatile int&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<CommonWithIntButRefLong&, volatile int&> : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
-struct std::common_type<int&, volatile CommonWithIntButRefLong&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<int&, volatile CommonWithIntButRefLong&> : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
 struct std::common_type<CommonWithIntButRefLong&, const volatile int&>
@@ -883,20 +847,18 @@ struct std::common_type<int&, const volatile CommonWithIntButRefLong&>
     : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
-struct std::common_type<const CommonWithIntButRefLong&, int&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<const CommonWithIntButRefLong&, int&> : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
-struct std::common_type<const int&, CommonWithIntButRefLong&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<const int&, CommonWithIntButRefLong&> : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
-struct std::common_type<const CommonWithIntButRefLong&, const int&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<const CommonWithIntButRefLong&, const int&> : std::common_type<CommonWithIntButRefLong&, int&> {
+};
 
 template <>
-struct std::common_type<const int&, const CommonWithIntButRefLong&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<const int&, const CommonWithIntButRefLong&> : std::common_type<CommonWithIntButRefLong&, int&> {
+};
 
 template <>
 struct std::common_type<const CommonWithIntButRefLong&, volatile int&>
@@ -915,12 +877,10 @@ struct std::common_type<const int&, const volatile CommonWithIntButRefLong&>
     : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
-struct std::common_type<volatile CommonWithIntButRefLong&, int&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<volatile CommonWithIntButRefLong&, int&> : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
-struct std::common_type<volatile int&, CommonWithIntButRefLong&>
-    : std::common_type<CommonWithIntButRefLong&, int&> {};
+struct std::common_type<volatile int&, CommonWithIntButRefLong&> : std::common_type<CommonWithIntButRefLong&, int&> {};
 
 template <>
 struct std::common_type<volatile CommonWithIntButRefLong&, const int&>
diff --git a/libcxx/test/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp b/libcxx/test/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp
index b1f572d910..ab79130f81 100644
--- a/libcxx/test/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp
+++ b/libcxx/test/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp
@@ -291,14 +291,12 @@ struct StructNotConvertibleToCommonReference {
 static_assert(std::convertible_to<int, StructNotConvertibleToCommonReference>);
 
 template <template <class> class X, template <class> class Y>
-struct std::basic_common_reference<StructNotConvertibleToCommonReference, int, X,
-                              Y> {
+struct std::basic_common_reference<StructNotConvertibleToCommonReference, int, X, Y> {
   using type = int&;
 };
 
 template <template <class> class X, template <class> class Y>
-struct std::basic_common_reference<int, StructNotConvertibleToCommonReference, X,
-                              Y> {
+struct std::basic_common_reference<int, StructNotConvertibleToCommonReference, X, Y> {
   using type = int&;
 };
 
diff --git a/libcxx/test/std/containers/Emplaceable.h b/libcxx/test/std/containers/Emplaceable.h
index 094b21ea35..1a4e14505f 100644
--- a/libcxx/test/std/containers/Emplaceable.h
+++ b/libcxx/test/std/containers/Emplaceable.h
@@ -41,12 +41,11 @@ public:
 };
 
 template <>
-struct std::hash<Emplaceable>
-{
-    typedef Emplaceable argument_type;
-    typedef std::size_t result_type;
+struct std::hash<Emplaceable> {
+  typedef Emplaceable argument_type;
+  typedef std::size_t result_type;
 
-    std::size_t operator()(const Emplaceable& x) const {return x.get();}
+  std::size_t operator()(const Emplaceable& x) const { return x.get(); }
 };
 
 #endif // TEST_STD_VER >= 11
diff --git a/libcxx/test/std/containers/NotConstructible.h b/libcxx/test/std/containers/NotConstructible.h
index dea5060680..213aa1442d 100644
--- a/libcxx/test/std/containers/NotConstructible.h
+++ b/libcxx/test/std/containers/NotConstructible.h
@@ -24,12 +24,11 @@ operator==(const NotConstructible&, const NotConstructible&)
 {return true;}
 
 template <>
-struct std::hash<NotConstructible>
-{
-    typedef NotConstructible argument_type;
-    typedef std::size_t result_type;
+struct std::hash<NotConstructible> {
+  typedef NotConstructible argument_type;
+  typedef std::size_t result_type;
 
-    std::size_t operator()(const NotConstructible&) const {return 0;}
+  std::size_t operator()(const NotConstructible&) const { return 0; }
 };
 
 #endif // NOTCONSTRUCTIBLE_H
diff --git a/libcxx/test/std/containers/container.node/node_handle.pass.cpp b/libcxx/test/std/containers/container.node/node_handle.pass.cpp
index 52bf22d7dc..de9564261a 100644
--- a/libcxx/test/std/containers/container.node/node_handle.pass.cpp
+++ b/libcxx/test/std/containers/container.node/node_handle.pass.cpp
@@ -60,12 +60,11 @@ struct Static
 };
 
 template <>
-struct std::hash<Static>
-{
-    using argument_type = Static;
-    using result_type = std::size_t;
-    hash() = default;
-    std::size_t operator()(const Static&) const;
+struct std::hash<Static> {
+  using argument_type = Static;
+  using result_type   = std::size_t;
+  hash()              = default;
+  std::size_t operator()(const Static&) const;
 };
 
 static_assert(node_compatibility_table<
diff --git a/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp b/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp
index 58b8172829..a8474f8f0b 100644
--- a/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/compare.pass.cpp
@@ -26,9 +26,8 @@ struct Key {
 };
 
 template <>
-struct std::hash<Key>
-{
-    std::size_t operator()(Key const &) const {return 0;}
+struct std::hash<Key> {
+  std::size_t operator()(Key const&) const { return 0; }
 };
 
 int main(int, char**)
diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp
index c3a92e993a..6ba28c0067 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp
@@ -60,7 +60,7 @@ public:
 
 template <>
 struct std::hash<Moveable> {
-    std::size_t operator () (const Moveable &m) const { return m.hash(); }
+  std::size_t operator()(const Moveable& m) const { return m.hash(); }
 };
 
 int main(int, char**)
diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp
index 686e9d0826..15cf8bc59e 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp
@@ -59,7 +59,7 @@ public:
 
 template <>
 struct std::hash<Moveable> {
-    std::size_t operator () (const Moveable &m) const { return m.hash(); }
+  std::size_t operator()(const Moveable& m) const { return m.hash(); }
 };
 
 int main(int, char**)
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp
index aca0b3c256..1572dd974f 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp
@@ -20,15 +20,13 @@
 using std::experimental::propagate_const;
 
 template <>
-struct std::hash<X>
-{
+struct std::hash<X> {
   typedef X first_argument_type;
 
   std::size_t operator()(const first_argument_type&) const
   {
     return 99;
   }
-
 };
 
 int main(int, char**) {
diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp
index 61d4e5c7f7..2cb2c67044 100644
--- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp
+++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp
@@ -54,11 +54,10 @@ private:
 };
 
 template <>
-struct std::pointer_traits<C<char>::pointer>
-{
-    typedef C<char>::pointer pointer;
-    typedef char             element_type;
-    typedef signed char      difference_type;
+struct std::pointer_traits<C<char>::pointer> {
+  typedef C<char>::pointer pointer;
+  typedef char element_type;
+  typedef signed char difference_type;
 };
 
 int main(int, char**)
diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp
index d199b5ba9f..d8f15af6ac 100644
--- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp
+++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp
@@ -52,9 +52,8 @@ private:
 };
 
 template <>
-struct std::pointer_traits<C<char>::pointer>
-{
-    typedef signed char difference_type;
+struct std::pointer_traits<C<char>::pointer> {
+  typedef signed char difference_type;
 };
 
 int main(int, char**)
diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp
index 938487f367..82929a3f3e 100644
--- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp
@@ -34,9 +34,8 @@ struct bad_reference_wrapper {
 };
 
 template <typename T>
-struct std::common_type<T, ::S<T> >
-{
-    typedef S<T> type;
+struct std::common_type<T, ::S<T> > {
+  typedef S<T> type;
 };
 
 template <class T>
@@ -50,9 +49,12 @@ struct std::common_type< ::S<T>, ::S<T> > {
   typedef S<T> type;
 };
 
-template <> struct std::common_type< ::S<long>, long> {};
-template <> struct std::common_type<long, ::S<long> > {};
-template <> struct std::common_type< ::X<double>, ::X<double> > {};
+template <>
+struct std::common_type< ::S<long>, long> {};
+template <>
+struct std::common_type<long, ::S<long> > {};
+template <>
+struct std::common_type< ::X<double>, ::X<double> > {};
 
 template <class> struct VoidT { typedef void type; };
 
diff --git a/libcxx/test/support/Counter.h b/libcxx/test/support/Counter.h
index 02057c158b..ed03e8a04a 100644
--- a/libcxx/test/support/Counter.h
+++ b/libcxx/test/support/Counter.h
@@ -41,12 +41,11 @@ private:
 int Counter_base::gConstructed = 0;
 
 template <class T>
-struct std::hash<Counter<T> >
-{
-    typedef Counter<T> argument_type;
-    typedef std::size_t result_type;
+struct std::hash<Counter<T> > {
+  typedef Counter<T> argument_type;
+  typedef std::size_t result_type;
 
-    std::size_t operator()(const Counter<T>& x) const {return std::hash<T>()(x.get());}
+  std::size_t operator()(const Counter<T>& x) const { return std::hash<T>()(x.get()); }
 };
 
 #endif

``````````

</details>


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


More information about the libcxx-commits mailing list