[libcxx-commits] [libcxx] [libc++][test] Cleanup typos and unnecessary semicolons (PR #73435)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Nov 26 02:41:29 PST 2023
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 9ba74c2ee044381544c8e1e736c4c85a1a9d56bf a8632f986f059f4dca2a69ca7caa09d283f451b3 -- libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp libcxx/test/libcxx/diagnostics/bit.nodiscard_extensions.compile.pass.cpp libcxx/test/libcxx/diagnostics/chrono.nodiscard_extensions.compile.pass.cpp libcxx/test/libcxx/diagnostics/format.nodiscard_extensions.compile.pass.cpp libcxx/test/libcxx/diagnostics/pstl.nodiscard_extensions.compile.pass.cpp libcxx/test/libcxx/diagnostics/ranges.nodiscard_extensions.compile.pass.cpp libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp libcxx/test/std/concepts/concepts.object/semiregular.compile.pass.cpp libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h libcxx/test/std/containers/views/mdspan/extents/CtorTestCombinations.h libcxx/test/std/containers/views/mdspan/extents/ctad.pass.cpp libcxx/test/std/containers/views/mdspan/extents/ctor_default.pass.cpp libcxx/test/std/containers/views/mdspan/extents/ctor_from_array.pass.cpp libcxx/test/std/containers/views/mdspan/extents/ctor_from_span.pass.cpp libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h libcxx/test/std/containers/views/mdspan/mdspan/types.pass.cpp libcxx/test/std/experimental/simd/simd.class/simd_ctor_default.pass.cpp libcxx/test/std/experimental/simd/simd.mask.class/simd_mask_ctor_default.pass.cpp libcxx/test/std/input.output/filesystems/class.file_status/file_status.status.eq.ops.cpp libcxx/test/std/input.output/syncstream/syncbuf/sputc.pass.cpp libcxx/test/std/input.output/syncstream/syncbuf/sputn.pass.cpp libcxx/test/std/input.output/syncstream/syncbuf/syncstream.syncbuf.assign/assign.pass.cpp libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/default.pass.cpp libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/start_size_stride.pass.cpp libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp libcxx/test/std/ranges/range.adaptors/range.zip/types.h libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp libcxx/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp libcxx/test/std/thread/futures/futures.async/async.pass.cpp libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/erase_after.compile.pass.cpp libcxx/test/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp libcxx/test/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp libcxx/test/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp libcxx/test/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp libcxx/test/std/utilities/expected/expected.void/swap/free.swap.pass.cpp libcxx/test/std/utilities/expected/expected.void/swap/member.swap.pass.cpp libcxx/test/std/utilities/expected/types.h libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp libcxx/test/std/utilities/format/format.functions/format_tests.h libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.verify.cpp libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp libcxx/test/support/assert_macros.h libcxx/test/support/boolean_testable.h libcxx/test/support/concat_macros.h libcxx/test/support/copy_move_types.h libcxx/test/support/iterator_traits_cpp17_iterators.h libcxx/test/support/test_container_comparisons.h libcxx/test/support/test_iterators.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
index d37f1a4bfa..b0512325d4 100644
--- a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
+++ b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
@@ -99,7 +99,7 @@ using Overloads = Overload<Types...>;
namespace variant_impl {
template <class ...Types>
using Overloads = std::__variant_detail::_MakeOverloads<Types...>;
-} // namespace variant_impl
+ } // namespace variant_impl
#ifndef TEST_NS
#error TEST_NS must be defined
diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp
index 925eeb5192..3e65f993f6 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp
@@ -52,7 +52,7 @@ CMyClass::CMyClass(const CMyClass& iOther) :
{
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
if (gCopyConstructorShouldThrow) {
- throw std::exception();
+ throw std::exception();
}
// Signal that the constructor has finished running
fMagicValue = kFinishedConstructionMagicValue;
@@ -80,8 +80,8 @@ int main(int, char**)
assert(false);
}
catch (...) {
- gCopyConstructorShouldThrow = false;
- assert(vec==vec2);
+ gCopyConstructorShouldThrow = false;
+ assert(vec == vec2);
}
}
diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp
index 83a5b14766..c1d7723bbb 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp
@@ -19,7 +19,6 @@
// Flag that makes the copy constructor for CMyClass throw an exception
static bool gCopyConstructorShouldThrow = false;
-
class CMyClass {
public: CMyClass(int tag);
public: CMyClass(const CMyClass& iOther);
@@ -52,7 +51,7 @@ CMyClass::CMyClass(const CMyClass& iOther) :
{
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
if (gCopyConstructorShouldThrow) {
- throw std::exception();
+ throw std::exception();
}
// Signal that the constructor has finished running
fMagicValue = kFinishedConstructionMagicValue;
@@ -80,8 +79,8 @@ int main(int, char**)
assert(false);
}
catch (...) {
- gCopyConstructorShouldThrow = false;
- assert(vec==vec2);
+ gCopyConstructorShouldThrow = false;
+ assert(vec == vec2);
}
}
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp
index c0ad94fa03..2d0f11c2bf 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp
@@ -20,7 +20,6 @@
// Flag that makes the copy constructor for CMyClass throw an exception
static bool gCopyConstructorShouldThrow = false;
-
class CMyClass {
public: CMyClass();
public: CMyClass(const CMyClass& iOther);
@@ -49,7 +48,7 @@ CMyClass::CMyClass(const CMyClass& /*iOther*/) :
{
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
if (gCopyConstructorShouldThrow) {
- throw std::exception();
+ throw std::exception();
}
// Signal that the constructor has finished running
fMagicValue = kFinishedConstructionMagicValue;
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
index 5b56ec002b..4e5b9bce14 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
@@ -42,12 +42,12 @@ bool g(int i)
}
struct PredLWG526 {
- PredLWG526 (int i) : i_(i) {}
- ~PredLWG526() { i_ = -32767; }
- bool operator() (const PredLWG526 &p) const { return p.i_ == i_; }
+ PredLWG526(int i) : i_(i) {}
+ ~PredLWG526() { i_ = -32767; }
+ bool operator()(const PredLWG526& p) const { return p.i_ == i_; }
- bool operator==(int i) const { return i == i_;}
- int i_;
+ bool operator==(int i) const { return i == i_; }
+ int i_;
};
int main(int, char**)
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp
index 154f0a14f7..3216717811 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp
@@ -35,12 +35,12 @@ void do_unique(L &l, Predicate pred, typename L::size_type expected)
struct PredLWG526 {
- PredLWG526 (int i) : i_(i) {}
- ~PredLWG526() { i_ = -32767; }
- bool operator() (const PredLWG526 &lhs, const PredLWG526 &rhs) const { return lhs.i_ == rhs.i_; }
+ PredLWG526(int i) : i_(i) {}
+ ~PredLWG526() { i_ = -32767; }
+ bool operator()(const PredLWG526& lhs, const PredLWG526& rhs) const { return lhs.i_ == rhs.i_; }
- bool operator==(int i) const { return i == i_;}
- int i_;
+ bool operator==(int i) const { return i == i_; }
+ int i_;
};
diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp
index 620aede2c1..0ef4bc4676 100644
--- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp
@@ -20,7 +20,6 @@
// Flag that makes the copy constructor for CMyClass throw an exception
static bool gCopyConstructorShouldThrow = false;
-
class CMyClass {
public: CMyClass();
public: CMyClass(const CMyClass& iOther);
@@ -49,7 +48,7 @@ CMyClass::CMyClass(const CMyClass& /*iOther*/) :
{
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
if (gCopyConstructorShouldThrow) {
- throw std::exception();
+ throw std::exception();
}
// Signal that the constructor has finished running
fMagicValue = kFinishedConstructionMagicValue;
diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp
index f65ad1a7d2..054559d177 100644
--- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp
@@ -20,7 +20,6 @@
// Flag that makes the copy constructor for CMyClass throw an exception
static bool gCopyConstructorShouldThrow = false;
-
class CMyClass {
public: CMyClass();
public: CMyClass(const CMyClass& iOther);
@@ -49,7 +48,7 @@ CMyClass::CMyClass(const CMyClass& /*iOther*/) :
{
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
if (gCopyConstructorShouldThrow) {
- throw std::exception();
+ throw std::exception();
}
// Signal that the constructor has finished running
fMagicValue = kFinishedConstructionMagicValue;
diff --git a/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp
index 429d6cc925..4050466a6c 100644
--- a/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp
@@ -30,12 +30,12 @@ bool g(int i)
}
struct PredLWG526 {
- PredLWG526 (int i) : i_(i) {}
- ~PredLWG526() { i_ = -32767; }
- bool operator() (const PredLWG526 &p) const { return p.i_ == i_; }
+ PredLWG526(int i) : i_(i) {}
+ ~PredLWG526() { i_ = -32767; }
+ bool operator()(const PredLWG526& p) const { return p.i_ == i_; }
- bool operator==(int i) const { return i == i_;}
- int i_;
+ bool operator==(int i) const { return i == i_; }
+ int i_;
};
typedef unary_counting_predicate<bool(*)(int), int> Predicate;
diff --git a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp
index cb21130f85..316b7c1b44 100644
--- a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp
@@ -24,12 +24,12 @@ bool g(int x, int y)
}
struct PredLWG526 {
- PredLWG526 (int i) : i_(i) {}
- ~PredLWG526() { i_ = -32767; }
- bool operator() (const PredLWG526 &lhs, const PredLWG526 &rhs) const { return lhs.i_ == rhs.i_; }
+ PredLWG526(int i) : i_(i) {}
+ ~PredLWG526() { i_ = -32767; }
+ bool operator()(const PredLWG526& lhs, const PredLWG526& rhs) const { return lhs.i_ == rhs.i_; }
- bool operator==(int i) const { return i == i_;}
- int i_;
+ bool operator==(int i) const { return i == i_; }
+ int i_;
};
int main(int, char**)
diff --git a/libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h b/libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h
index 2f31941a3e..2f081c38ef 100644
--- a/libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h
+++ b/libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h
@@ -12,7 +12,7 @@
struct IntType {
int val;
constexpr IntType() = default;
- constexpr IntType(int v) noexcept : val(v){}
+ constexpr IntType(int v) noexcept : val(v) {}
constexpr bool operator==(const IntType& rhs) const { return val == rhs.val; }
constexpr operator int() const noexcept { return val; }
@@ -24,7 +24,7 @@ struct IntType {
struct IntTypeNC {
int val;
constexpr IntTypeNC() = default;
- constexpr IntTypeNC(int v) noexcept : val(v){}
+ constexpr IntTypeNC(int v) noexcept : val(v) {}
constexpr bool operator==(const IntType& rhs) const { return val == rhs.val; }
constexpr operator int() noexcept { return val; }
diff --git a/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h b/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h
index b918c66f38..26a99975b8 100644
--- a/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h
+++ b/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h
@@ -76,7 +76,7 @@ private:
public:
constexpr mapping() noexcept = delete;
- constexpr mapping(const mapping& other) noexcept : extents_(other.extents()){}
+ constexpr mapping(const mapping& other) noexcept : extents_(other.extents()) {}
constexpr mapping(extents_type&& ext) noexcept
requires(Wrap == 8)
: extents_(ext) {}
@@ -240,9 +240,9 @@ private:
public:
constexpr mapping() noexcept = delete;
constexpr mapping(const mapping& other) noexcept
- : extents_(other.extents_), offset_(other.offset_), scaling_(other.scaling_){}
+ : extents_(other.extents_), offset_(other.offset_), scaling_(other.scaling_) {}
constexpr mapping(const extents_type& ext, index_type offset = 0, index_type scaling = 1) noexcept
- : extents_(ext), offset_(offset), scaling_(scaling){}
+ : extents_(ext), offset_(offset), scaling_(scaling) {}
template <class OtherExtents>
constexpr mapping(const mapping<OtherExtents>& other) noexcept {
diff --git a/libcxx/test/std/containers/views/mdspan/extents/ctad.pass.cpp b/libcxx/test/std/containers/views/mdspan/extents/ctad.pass.cpp
index 6836c57a8c..3f99d8a3b4 100644
--- a/libcxx/test/std/containers/views/mdspan/extents/ctad.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/extents/ctad.pass.cpp
@@ -24,7 +24,7 @@
struct NoDefaultCtorIndex {
size_t value;
constexpr NoDefaultCtorIndex() = delete;
- constexpr NoDefaultCtorIndex(size_t val) : value(val){}
+ constexpr NoDefaultCtorIndex(size_t val) : value(val) {}
constexpr operator size_t() const noexcept { return value; }
};
diff --git a/libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h b/libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h
index 0f947cfba4..4c1cff8173 100644
--- a/libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h
+++ b/libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h
@@ -50,7 +50,7 @@ struct move_counted_handle {
constexpr move_counted_handle(const move_counted_handle&) = default;
template <class OtherT>
requires(std::is_constructible_v<T*, OtherT*>)
- constexpr move_counted_handle(const move_counted_handle<OtherT>& other) : ptr(other.ptr){}
+ constexpr move_counted_handle(const move_counted_handle<OtherT>& other) : ptr(other.ptr) {}
constexpr move_counted_handle(move_counted_handle&& other) {
ptr = other.ptr;
if !consteval {
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
index d4bfa395bd..2926b22cff 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
@@ -20,7 +20,7 @@
struct ThrowingMove {
ThrowingMove() = default;
- ThrowingMove(ThrowingMove&&){}
+ ThrowingMove(ThrowingMove&&) {}
};
constexpr bool test() {
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
index 0923b30b2e..bb0ec1c813 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
@@ -19,7 +19,7 @@
struct ThrowingMove {
ThrowingMove() = default;
- ThrowingMove(ThrowingMove&&){}
+ ThrowingMove(ThrowingMove&&) {}
ThrowingMove& operator=(ThrowingMove&&){return *this;}
};
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/types.h b/libcxx/test/std/ranges/range.adaptors/range.zip/types.h
index d4e3da3ede..e5f399f93e 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/types.h
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/types.h
@@ -127,7 +127,7 @@ struct NonCommonSized : IntBufferView {
};
using SimpleNonCommonSized = NonCommonSized<true>;
-using SimpleNonCommonRandomAccessSized = SimpleNonCommonSized;
+using SimpleNonCommonRandomAccessSized = SimpleNonCommonSized;
using NonSimpleNonCommonSized = NonCommonSized<false>;
using NonSimpleNonCommonRandomAccessSized = NonSimpleNonCommonSized;
diff --git a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp
index cf2a66e2d0..7e0d82f0d6 100644
--- a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp
@@ -78,31 +78,31 @@ void f5(int j)
TEST_THROW(j);
}
-template <class Ret, class CheckLambda, class ...Args>
+template <class Ret, class CheckLambda, class... Args>
void test(CheckLambda&& getAndCheckFn, bool IsDeferred, Args&&... args) {
- // Reset global state.
- invoked = false;
-
- // Create the future and wait
- std::future<Ret> f = std::async(std::forward<Args>(args)...);
- std::this_thread::sleep_for(ms(300));
-
- // Check that deferred async's have not invoked the function.
- assert(invoked == !IsDeferred);
-
- // Time the call to f.get() and check that the returned value matches
- // what is expected.
- Clock::time_point t0 = Clock::now();
- assert(getAndCheckFn(f));
- Clock::time_point t1 = Clock::now();
-
- // If the async is deferred it should take more than 100ms, otherwise
- // it should take less than 100ms.
- if (IsDeferred) {
- assert(t1-t0 > ms(100));
- } else {
- assert(t1-t0 < ms(100));
- }
+ // Reset global state.
+ invoked = false;
+
+ // Create the future and wait
+ std::future<Ret> f = std::async(std::forward<Args>(args)...);
+ std::this_thread::sleep_for(ms(300));
+
+ // Check that deferred async's have not invoked the function.
+ assert(invoked == !IsDeferred);
+
+ // Time the call to f.get() and check that the returned value matches
+ // what is expected.
+ Clock::time_point t0 = Clock::now();
+ assert(getAndCheckFn(f));
+ Clock::time_point t1 = Clock::now();
+
+ // If the async is deferred it should take more than 100ms, otherwise
+ // it should take less than 100ms.
+ if (IsDeferred) {
+ assert(t1 - t0 > ms(100));
+ } else {
+ assert(t1 - t0 < ms(100));
+ }
}
int main(int, char**)
diff --git a/libcxx/test/std/utilities/expected/types.h b/libcxx/test/std/utilities/expected/types.h
index 06a7097e43..90768ed8e7 100644
--- a/libcxx/test/std/utilities/expected/types.h
+++ b/libcxx/test/std/utilities/expected/types.h
@@ -175,7 +175,7 @@ struct TailClobberer {
friend constexpr bool operator==(const TailClobberer&, const TailClobberer&) = default;
- friend constexpr void swap(TailClobberer&, TailClobberer&){}
+ friend constexpr void swap(TailClobberer&, TailClobberer&) {}
private:
alignas(2) bool b;
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
index 094999a87c..42225a4b0b 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
@@ -53,11 +53,11 @@ class MoveDeleter
MoveDeleter();
MoveDeleter(MoveDeleter const&);
public:
- MoveDeleter(MoveDeleter&&) {}
+ MoveDeleter(MoveDeleter&&) {}
- explicit MoveDeleter(int) {}
+ explicit MoveDeleter(int) {}
- void operator()(T *ptr) { delete ptr; }
+ void operator()(T* ptr) { delete ptr; }
};
// https://llvm.org/PR60258
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
index e46a91ec37..a110525b9b 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
@@ -53,11 +53,11 @@ class MoveDeleter
MoveDeleter();
MoveDeleter(MoveDeleter const&);
public:
- MoveDeleter(MoveDeleter&&) {}
+ MoveDeleter(MoveDeleter&&) {}
- explicit MoveDeleter(int) {}
+ explicit MoveDeleter(int) {}
- void operator()(T *ptr) { delete ptr; }
+ void operator()(T* ptr) { delete ptr; }
};
// https://llvm.org/PR60258
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp
index 72d88998bb..222a552e58 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp
@@ -43,7 +43,7 @@ public:
MyAllocator(int i) : id(i) {}
template <class U>
- MyAllocator(MyAllocator<U> const& other) : id(other.id){}
+ MyAllocator(MyAllocator<U> const& other) : id(other.id) {}
pointer allocate(std::ptrdiff_t n) {
return pointer(static_cast<T*>(::operator new(n * sizeof(T))));
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp
index 9bc3c29b04..e168ff78fe 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp
@@ -20,7 +20,7 @@
struct S {
private:
- S () {} // ctor is private
+ S() {} // ctor is private
};
int main(int, char**)
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp
index a1f8093d81..7fc2fd1dfe 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp
@@ -20,7 +20,7 @@
struct A {
int a;
- virtual ~A(){}
+ virtual ~A() {}
};
struct B : A {};
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
index d38d23bc91..dedfe8e719 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
@@ -38,7 +38,6 @@ struct DefaultCtorBlowsUp {
struct DerivedFromAllocArgT : std::allocator_arg_t {};
-
// Make sure the _Up... constructor SFINAEs out when the number of initializers
// is less than the number of elements in the tuple. Previously libc++ would
// offer these constructors as an extension but they broke conforming code.
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.verify.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.verify.cpp
index 21a3c03afa..e029242f9a 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.verify.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.verify.cpp
@@ -31,7 +31,7 @@ std::tuple<ExplicitCopy> const_explicit_copy_test() {
}
std::tuple<ExplicitCopy> non_const_explicit_copy_test() {
- ExplicitCopy e(42);
- return {std::allocator_arg, std::allocator<int>{}, e};
- // expected-error at -1 {{chosen constructor is explicit in copy-initialization}}
+ ExplicitCopy e(42);
+ return {std::allocator_arg, std::allocator<int>{}, e};
+ // expected-error at -1 {{chosen constructor is explicit in copy-initialization}}
}
diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h
index 73097c900a..26a0cc0530 100644
--- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h
+++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h
@@ -14,7 +14,8 @@
class TrackingMemRes : public std::pmr::memory_resource {
public:
- TrackingMemRes(std::size_t* last_size, size_t* last_alignment) : last_size_(last_size), last_alignment_(last_alignment) {}
+ TrackingMemRes(std::size_t* last_size, size_t* last_alignment)
+ : last_size_(last_size), last_alignment_(last_alignment) {}
private:
std::size_t* last_size_;
diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp
index 1a07dcd446..64740a8740 100644
--- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp
+++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp
@@ -23,13 +23,13 @@
struct Derived : ConstexprTestTypes::MoveOnly {
Derived() = default;
- TEST_CONSTEXPR_CXX20 Derived(ConstexprTestTypes::MoveOnly&&){}
+ TEST_CONSTEXPR_CXX20 Derived(ConstexprTestTypes::MoveOnly&&) {}
};
struct CountAssign {
int copied = 0;
int moved = 0;
TEST_CONSTEXPR_CXX20 CountAssign() = default;
- TEST_CONSTEXPR_CXX20 CountAssign(const int){}
+ TEST_CONSTEXPR_CXX20 CountAssign(const int) {}
TEST_CONSTEXPR_CXX20 CountAssign& operator=(CountAssign const&) {
++copied;
return *this;
``````````
</details>
https://github.com/llvm/llvm-project/pull/73435
More information about the libcxx-commits
mailing list