Skip to content

Commit f5832ba

Browse files
[libc++][test] Cleanup typos and unnecessary semicolons (#73435)
I've structured this into a series of commits for even easier reviewing, if that helps. I could easily split this up into separate PRs if desired, but as this is low-risk with simple edits, I thought one PR would be easiest. * Drop unnecessary semicolons after function definitions. * Cleanup comment typos. * Cleanup `static_assert` typos. * Cleanup test code typos. + There should be no functional changes, assuming I've changed all occurrences. * ~~Fix massive test code typos.~~ + This was a real problem, but needed more surgery. I reverted those changes here, and @philnik777 is fixing this properly with #73444. * clang-formatting as requested by the CI.
1 parent af3c5a7 commit f5832ba

File tree

93 files changed

+239
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+239
-243
lines changed

libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ constexpr bool test() {
302302
// Copying from `bool` to `char` will invoke the optimization, so only check one direction.
303303
test_copy_and_move<char, bool>();
304304

305-
// Copying between different structs with the same represenation (there is no way to guarantee the representation is
305+
// Copying between different structs with the same representation (there is no way to guarantee the representation is
306306
// the same).
307307
test_copy_and_move<S1, S2>();
308-
// Copying between different unions with the same represenation.
308+
// Copying between different unions with the same representation.
309309
test_copy_and_move<U1, U2>();
310310

311311
// Copying from a regular pointer to a void pointer (these are not considered trivially copyable).

libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// UNSUPPORTED: c++03, c++11, c++14
1010
// UNSUPPORTED: libcpp-has-no-incomplete-pstl
1111

12-
// Having a customization point outside the module doesn't work, so this test is inherintly module-hostile.
12+
// Having a customization point outside the module doesn't work, so this test is inherently module-hostile.
1313
// UNSUPPORTED: clang-modules-build
1414

1515
// Make sure that the customization points get called properly when overloaded

libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ int main(int, char**) {
101101
([=] { std::layout_stride::template mapping<std::extents<signed char, D, 10>> m(arg); }()),
102102
"layout_stride::mapping converting ctor: other.required_span_size() must be representable as index_type.");
103103
}
104-
// base offset must be 0 (i.e. mapping(0,...,0)==0) for a strided layout with positiv strides
104+
// base offset must be 0 (i.e. mapping(0,...,0)==0) for a strided layout with positive strides
105105
{
106106
always_convertible_layout::mapping<std::dextents<int, 2>> offset_map(std::dextents<int, 2>{10, 10}, 3);
107107
TEST_LIBCPP_ASSERT_FAILURE(

libcxx/test/libcxx/diagnostics/bit.nodiscard_extensions.compile.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_NODISCARD_EXT
1212

1313
// Check that <bit> functions aren't marked [[nodiscard]] when
14-
// _LIBCPP_DISBALE_NODISCARD_EXT is defined
14+
// _LIBCPP_DISABLE_NODISCARD_EXT is defined
1515

1616
#include <bit>
1717

libcxx/test/libcxx/diagnostics/chrono.nodiscard_extensions.compile.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
// Check that format functions aren't marked [[nodiscard]] when
10-
// _LIBCPP_DISBALE_NODISCARD_EXT is defined
10+
// _LIBCPP_DISABLE_NODISCARD_EXT is defined
1111

1212
// UNSUPPORTED: c++03, c++11, c++14, c++17
1313
// UNSUPPORTED: no-filesystem, no-localization, no-tzdb

libcxx/test/libcxx/diagnostics/format.nodiscard_extensions.compile.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
// Check that format functions aren't marked [[nodiscard]] when
10-
// _LIBCPP_DISBALE_NODISCARD_EXT is defined
10+
// _LIBCPP_DISABLE_NODISCARD_EXT is defined
1111

1212
// TODO FMT This test should not require std::to_chars(floating-point)
1313
// XFAIL: availability-fp_to_chars-missing

libcxx/test/libcxx/diagnostics/pstl.nodiscard_extensions.compile.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
// Check that PSTL algorithms aren't marked [[nodiscard]] when
10-
// _LIBCPP_DISBALE_NODISCARD_EXT is defined
10+
// _LIBCPP_DISABLE_NODISCARD_EXT is defined
1111

1212
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_NODISCARD_EXT
1313

libcxx/test/libcxx/diagnostics/ranges.nodiscard_extensions.compile.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
// Check that ranges algorithms aren't marked [[nodiscard]] when
10-
// _LIBCPP_DISBALE_NODISCARD_EXT is defined
10+
// _LIBCPP_DISABLE_NODISCARD_EXT is defined
1111

1212
// UNSUPPORTED: c++03, c++11, c++14, c++17
1313

libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// void polymorphic_allocator<T>::construct(pair<T1, T2>*, piecewise_construct_t
2222
// tuple<Args1...> x, tuple<Args2...>)
2323

24-
// The stardard specifiers a tranformation to uses-allocator construction as
24+
// The standard specifies a transformation to uses-allocator construction as
2525
// follows:
2626
// - If uses_allocator_v<T1,memory_resource*> is false and
2727
// is_constructible_v<T,Args1...> is true, then xprime is x.
@@ -36,7 +36,7 @@
3636
//
3737
// The use of "xprime = tuple_cat(..., std::move(x), ...)" causes all of the
3838
// objects in 'x' to be copied into 'xprime'. If 'x' contains any types which
39-
// are stored by value this causes an unessary copy to occur. To prevent this
39+
// are stored by value this causes an unnecessary copy to occur. To prevent this
4040
// libc++ changes this call into
4141
// "xprime = forward_as_tuple(..., std::get<Idx>(std::move(x))..., ...)".
4242
// 'xprime' contains references to the values in 'x' instead of copying them.

libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ using Overloads = Overload<Types...>;
9999
namespace variant_impl {
100100
template <class ...Types>
101101
using Overloads = std::__variant_detail::_MakeOverloads<Types...>;
102-
} // naamespace variant_impl
102+
} // namespace variant_impl
103103

104104
#ifndef TEST_NS
105105
#error TEST_NS must be defined

0 commit comments

Comments
 (0)