[libcxx-commits] [libcxx] 355e0ce - [libc++] Extend check for non-ASCII characters to src/, test/ and benchmarks/
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 23 15:37:22 PDT 2022
Author: Louis Dionne
Date: 2022-08-23T18:36:38-04:00
New Revision: 355e0ce3c5366bd0b564a25e4b6675353da3c53e
URL: https://github.com/llvm/llvm-project/commit/355e0ce3c5366bd0b564a25e4b6675353da3c53e
DIFF: https://github.com/llvm/llvm-project/commit/355e0ce3c5366bd0b564a25e4b6675353da3c53e.diff
LOG: [libc++] Extend check for non-ASCII characters to src/, test/ and benchmarks/
Differential Revision: https://reviews.llvm.org/D132180
Added:
Modified:
libcxx/benchmarks/algorithms/common.h
libcxx/benchmarks/formatter_float.bench.cpp
libcxx/src/atomic.cpp
libcxx/src/charconv.cpp
libcxx/src/ios.cpp
libcxx/src/iostream.cpp
libcxx/src/locale.cpp
libcxx/src/optional.cpp
libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp
libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp
libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp
libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp
libcxx/test/libcxx/iterators/assert.advance.pass.cpp
libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp
libcxx/test/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
libcxx/test/libcxx/memory/is_allocator.pass.cpp
libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp
libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp
libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
libcxx/test/std/containers/sequences/list/list.ops/remove.pass.cpp
libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp
libcxx/test/std/containers/sequences/list/list.ops/unique.pass.cpp
libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp
libcxx/test/std/containers/views/views.span/span.cons/array.fail.cpp
libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
libcxx/test/std/containers/views/views.span/span.cons/stdarray.pass.cpp
libcxx/test/std/experimental/utilities/meta/meta.detect/nonesuch.fail.cpp
libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp
libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp
libcxx/test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp
libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp
libcxx/test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp
libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.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/re/re.regex/re.regex.construct/deduct.fail.cpp
libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp
libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp
libcxx/test/std/time/time.cal/time.cal.operators/month_day.pass.cpp
libcxx/test/std/time/time.cal/time.cal.operators/month_day_last.pass.cpp
libcxx/test/std/time/time.cal/time.cal.operators/month_weekday.pass.cpp
libcxx/test/std/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp
libcxx/test/std/time/time.cal/time.cal.operators/year_month.pass.cpp
libcxx/test/std/time/time.cal/time.cal.operators/year_month_day.pass.cpp
libcxx/test/std/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp
libcxx/test/std/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp
libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp
libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp
libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp
libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp
libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp
libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp
libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
libcxx/test/std/time/time.clock/time.clock.system/local_time.types.pass.cpp
libcxx/test/std/time/time.clock/time.clock.system/sys.time.types.pass.cpp
libcxx/test/std/time/time.hms/time.12/is_am.pass.cpp
libcxx/test/std/time/time.hms/time.hms.members/is_negative.pass.cpp
libcxx/test/std/time/time.hms/time.hms.members/precision.pass.cpp
libcxx/test/std/time/time.hms/time.hms.members/width.pass.cpp
libcxx/test/std/utilities/format/format.functions/format.verify.cpp
libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_const_move.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_non_const_copy.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_const_move.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_non_const_copy.pass.cpp
libcxx/test/support/filesystem_test_helper.h
libcxx/test/support/fp_compare.h
libcxx/utils/ci/run-buildbot
Removed:
################################################################################
diff --git a/libcxx/benchmarks/algorithms/common.h b/libcxx/benchmarks/algorithms/common.h
index 9a05a2fedbe6e..ffa39e26be54b 100644
--- a/libcxx/benchmarks/algorithms/common.h
+++ b/libcxx/benchmarks/algorithms/common.h
@@ -49,8 +49,8 @@ struct AllOrders : EnumValuesAsTuple<AllOrders, Order, 7> {
// These values are arranged in such a way that they would invoke O(N^2)
// behavior on any quick sort implementation that satisifies certain conditions.
// Details are available in the following paper:
-// "A Killer Adversary for Quicksort", M. D. McIlroy, Software—Practice &
-// ExperienceVolume 29 Issue 4 April 10, 1999 pp 341–344.
+// "A Killer Adversary for Quicksort", M. D. McIlroy, Software-Practice &
+// Experience Volume 29 Issue 4 April 10, 1999 pp 341-344.
// https://dl.acm.org/doi/10.5555/311868.311871.
template <class T>
void fillAdversarialQuickSortInput(T& V, size_t N) {
diff --git a/libcxx/benchmarks/formatter_float.bench.cpp b/libcxx/benchmarks/formatter_float.bench.cpp
index ee04647aa955a..09963b6108feb 100644
--- a/libcxx/benchmarks/formatter_float.bench.cpp
+++ b/libcxx/benchmarks/formatter_float.bench.cpp
@@ -203,7 +203,7 @@ struct Precision<PrecisionE::Small> {
template <>
struct Precision<PrecisionE::Huge> {
- // The maximum precision for a minimal sub normal long double is ±0x1p-16494.
+ // The maximum precision for a minimal sub normal long double is +/- 0x1p-16494.
// This value is always larger than that value forcing the trailing zero path
// to be executed.
static constexpr const char* fmt = ".17000";
diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp
index 250d33e98b027..ec7bb7d9b2c36 100644
--- a/libcxx/src/atomic.cpp
+++ b/libcxx/src/atomic.cpp
@@ -52,11 +52,11 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo
#elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK)
extern "C" int __ulock_wait(uint32_t operation, void *addr, uint64_t value,
- uint32_t timeout); /* timeout is specified in microseconds */
+ uint32_t timeout); /* timeout is specified in microseconds */
extern "C" int __ulock_wake(uint32_t operation, void *addr, uint64_t wake_value);
-#define UL_COMPARE_AND_WAIT 1
-#define ULF_WAKE_ALL 0x00000100
+#define UL_COMPARE_AND_WAIT 1
+#define ULF_WAKE_ALL 0x00000100
static void __libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr,
__cxx_contention_t __val)
diff --git a/libcxx/src/charconv.cpp b/libcxx/src/charconv.cpp
index 05ee2cbd4ac87..d01ecddc46601 100644
--- a/libcxx/src/charconv.cpp
+++ b/libcxx/src/charconv.cpp
@@ -21,13 +21,13 @@ namespace __itoa
_LIBCPP_FUNC_VIS char*
__u32toa(uint32_t value, char* buffer) noexcept
{
- return __base_10_u32(buffer, value);
+ return __base_10_u32(buffer, value);
}
_LIBCPP_FUNC_VIS char*
__u64toa(uint64_t value, char* buffer) noexcept
{
- return __base_10_u64(buffer, value);
+ return __base_10_u64(buffer, value);
}
} // namespace __itoa
diff --git a/libcxx/src/ios.cpp b/libcxx/src/ios.cpp
index 218b27f1a6b50..870406b554d98 100644
--- a/libcxx/src/ios.cpp
+++ b/libcxx/src/ios.cpp
@@ -145,11 +145,11 @@ int ios_base::__xindex_ = 0;
template <typename _Tp>
static size_t __ios_new_cap(size_t __req_size, size_t __current_cap)
{ // Precondition: __req_size > __current_cap
- const size_t mx = std::numeric_limits<size_t>::max() / sizeof(_Tp);
- if (__req_size < mx/2)
- return _VSTD::max(2 * __current_cap, __req_size);
- else
- return mx;
+ const size_t mx = std::numeric_limits<size_t>::max() / sizeof(_Tp);
+ if (__req_size < mx/2)
+ return _VSTD::max(2 * __current_cap, __req_size);
+ else
+ return mx;
}
int
diff --git a/libcxx/src/iostream.cpp b/libcxx/src/iostream.cpp
index 6164fd7a525ed..a8948ac55608b 100644
--- a/libcxx/src/iostream.cpp
+++ b/libcxx/src/iostream.cpp
@@ -109,8 +109,8 @@ static void force_locale_initialization() {
class DoIOSInit {
public:
- DoIOSInit();
- ~DoIOSInit();
+ DoIOSInit();
+ ~DoIOSInit();
};
DoIOSInit::DoIOSInit()
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 6b454274e130e..02da95cc300ba 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -4805,7 +4805,7 @@ __check_grouping(const string& __grouping, unsigned* __g, unsigned* __g_end,
{
// if the grouping pattern is empty _or_ there are no grouping bits, then do nothing
// we always have at least a single entry in [__g, __g_end); the end of the input sequence
- if (__grouping.size() != 0 && __g_end - __g > 1)
+ if (__grouping.size() != 0 && __g_end - __g > 1)
{
reverse(__g, __g_end);
const char* __ig = __grouping.data();
@@ -4838,7 +4838,7 @@ __num_put_base::__format_int(char* __fmtp, const char* __len, bool __signd,
if ((__flags & ios_base::showpos) &&
(__flags & ios_base::basefield) != ios_base::oct &&
(__flags & ios_base::basefield) != ios_base::hex &&
- __signd)
+ __signd)
*__fmtp++ = '+';
if (__flags & ios_base::showbase)
*__fmtp++ = '#';
diff --git a/libcxx/src/optional.cpp b/libcxx/src/optional.cpp
index ac1a0a5b5e883..e2b5ccef99aef 100644
--- a/libcxx/src/optional.cpp
+++ b/libcxx/src/optional.cpp
@@ -16,7 +16,7 @@ bad_optional_access::~bad_optional_access() noexcept = default;
const char* bad_optional_access::what() const noexcept {
return "bad_optional_access";
- }
+}
} // std
@@ -28,13 +28,13 @@ const char* bad_optional_access::what() const noexcept {
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
- : public std::logic_error
+ : public std::logic_error
{
public:
- bad_optional_access() : std::logic_error("Bad optional Access") {}
+ bad_optional_access() : std::logic_error("Bad optional Access") {}
-// Get the key function ~bad_optional_access() into the dylib
- virtual ~bad_optional_access() noexcept;
+ // Get the key function ~bad_optional_access() into the dylib
+ virtual ~bad_optional_access() noexcept;
};
bad_optional_access::~bad_optional_access() noexcept = default;
diff --git a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp
index 0dff1c707587a..6295e21c46d30 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp
@@ -19,7 +19,7 @@ _LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; }
int main(int, char**)
{
- foo(); // no error here!
+ foo(); // no error here!
return 0;
}
diff --git a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
index b281632a6fd68..9198d0522318f 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// Test that _LIBCPP_NODISCARD_AFTER_CXX17 works
-// #define _LIBCPP_NODISCARD_AFTER_CXX17 [[nodiscard]]
+// #define _LIBCPP_NODISCARD_AFTER_CXX17 [[nodiscard]]
// UNSUPPORTED: c++03, c++11, c++14, c++17
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp
index 0cec4ca35a020..3e35de2a7cacd 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp
@@ -17,8 +17,8 @@
int main(int, char**)
{
- std::basic_filebuf<char, std::char_traits<wchar_t> > f;
-// expected-error-re at streambuf:* {{{{(static_assert|static assertion)}} failed{{.*}}traits_type::char_type must be the same type as CharT}}
+ std::basic_filebuf<char, std::char_traits<wchar_t> > f;
+ // expected-error-re at streambuf:* {{{{(static_assert|static assertion)}} failed{{.*}}traits_type::char_type must be the same type as CharT}}
return 0;
}
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp
index 90092f371b313..02df694273748 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp
@@ -12,7 +12,7 @@
// close();
-// Inspired by PR#38052 - std::fstream still good after closing and updating content
+// Inspired by PR#38052 - std::fstream still good after closing and updating content
#include <fstream>
#include <cassert>
@@ -33,5 +33,5 @@ int main(int, char**)
std::remove(temp.c_str());
- return 0;
+ return 0;
}
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
index 4ec84bb7c45a3..884fdc4dca26d 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
@@ -17,7 +17,7 @@
int main(int, char**)
{
- std::basic_fstream<char, std::char_traits<wchar_t> > f;
+ std::basic_fstream<char, std::char_traits<wchar_t> > f;
// expected-error-re at ios:* {{{{(static_assert|static assertion)}} failed{{.*}}traits_type::char_type must be the same type as CharT}}
// expected-error-re at streambuf:* {{{{(static_assert|static assertion)}} failed{{.*}}traits_type::char_type must be the same type as CharT}}
diff --git a/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp b/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp
index 37641bcb9413d..cba2535594c50 100644
--- a/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp
+++ b/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp
@@ -20,7 +20,7 @@
int main(int, char**)
{
- std::basic_stringbuf<char, std::char_traits<wchar_t> > sb;
+ std::basic_stringbuf<char, std::char_traits<wchar_t> > sb;
// expected-error-re at streambuf:* {{{{(static_assert|static assertion)}} failed{{.*}}traits_type::char_type must be the same type as CharT}}
// expected-error-re at string:* {{{{(static_assert|static assertion)}} failed{{.*}}traits_type::char_type must be the same type as CharT}}
diff --git a/libcxx/test/libcxx/iterators/assert.advance.pass.cpp b/libcxx/test/libcxx/iterators/assert.advance.pass.cpp
index 3fb2dcd410c89..715aebed2d98c 100644
--- a/libcxx/test/libcxx/iterators/assert.advance.pass.cpp
+++ b/libcxx/test/libcxx/iterators/assert.advance.pass.cpp
@@ -24,13 +24,13 @@ int main(int, char**) {
int a[] = {1, 2, 3};
bidirectional_iterator<int *> bidi(a+1);
- std::advance(bidi, 1); // should work fine
- std::advance(bidi, 0); // should work fine
+ std::advance(bidi, 1); // should work fine
+ std::advance(bidi, 0); // should work fine
std::advance(bidi, -1); // should work fine
forward_iterator<int *> it(a+1);
- std::advance(it, 1); // should work fine
- std::advance(it, 0); // should work fine
+ std::advance(it, 1); // should work fine
+ std::advance(it, 0); // should work fine
TEST_LIBCPP_ASSERT_FAILURE(std::advance(it, -1), "Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
return 0;
diff --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp
index 87324ab09d31d..37c5ad9610a60 100644
--- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp
+++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp
@@ -49,6 +49,6 @@ struct no_element_type {
void test() {
(void) std::contiguous_iterator<no_element_type>;
- // expected-error@*:* {{implicit instantiation of undefined template}}
- // expected-note@*:* {{to_address}}
+ // expected-error@*:* {{implicit instantiation of undefined template}}
+ // expected-note@*:* {{to_address}}
}
diff --git a/libcxx/test/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp b/libcxx/test/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
index afb445378fd55..c856c931f5280 100644
--- a/libcxx/test/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
+++ b/libcxx/test/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
@@ -12,7 +12,7 @@
// bool failed() const throw();
//
-// Extension: constructing from NULL is UB; we just make it a failed iterator
+// Extension: constructing from NULL is UB; we just make it a failed iterator
#include <iterator>
#include <cassert>
diff --git a/libcxx/test/libcxx/memory/is_allocator.pass.cpp b/libcxx/test/libcxx/memory/is_allocator.pass.cpp
index fea30be36da8e..cf11d077bf086 100644
--- a/libcxx/test/libcxx/memory/is_allocator.pass.cpp
+++ b/libcxx/test/libcxx/memory/is_allocator.pass.cpp
@@ -25,19 +25,19 @@
template <typename T>
void test_allocators()
{
- static_assert(!std::__is_allocator<T>::value, "" );
- static_assert( std::__is_allocator<std::allocator<T>>::value, "" );
- static_assert( std::__is_allocator<test_allocator<T>>::value, "" );
- static_assert( std::__is_allocator<min_allocator<T>>::value, "" );
+ static_assert(!std::__is_allocator<T>::value, "" );
+ static_assert( std::__is_allocator<std::allocator<T>>::value, "" );
+ static_assert( std::__is_allocator<test_allocator<T>>::value, "" );
+ static_assert( std::__is_allocator<min_allocator<T>>::value, "" );
}
int main(int, char**)
{
-// test_allocators<void>();
- test_allocators<char>();
- test_allocators<int>();
- test_allocators<std::string>();
+ // test_allocators<void>();
+ test_allocators<char>();
+ test_allocators<int>();
+ test_allocators<std::string>();
- return 0;
+ return 0;
}
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp
index a2eee365e494c..f9fd47cd8b527 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp
@@ -50,7 +50,7 @@ concept HasInplaceMergeIter =
static_assert(HasInplaceMergeIter<int*, int*, int*>);
-// !bidirectional_iterator<I>
+// !bidirectional_iterator<I>
static_assert(!HasInplaceMergeIter<BidirectionalIteratorNotDerivedFrom>);
static_assert(!HasInplaceMergeIter<cpp20_input_iterator<int*>>);
@@ -287,7 +287,7 @@ bool test() {
// Complexity: Let N = last - first :
// - For the overloads with no ExecutionPolicy, and if enough
- // additional memory is available, exactly N − 1 comparisons.
+ // additional memory is available, exactly N - 1 comparisons.
// - Otherwise, O(NlogN) comparisons.
// In either case, twice as many projections as comparisons.
{
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp
index ed25eae7aa496..a648e7df10a10 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp
@@ -10,13 +10,13 @@
// <algorithm>
-// template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
+// template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
// class Proj = identity>
// requires sortable<I, Comp, Proj>
// constexpr I
// ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {}); // since C++20
//
-// template<random_access_range R, class Comp = ranges::less, class Proj = identity>
+// template<random_access_range R, class Comp = ranges::less, class Proj = identity>
// requires sortable<iterator_t<R>, Comp, Proj>
// constexpr borrowed_iterator_t<R>
// ranges::nth_element(R&& r, iterator_t<R> nth, Comp comp = {}, Proj proj = {}); // since C++20
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
index 408a9564fa22f..34eddfdb03699 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
@@ -321,7 +321,7 @@ constexpr bool test() {
// Stable ([algorithm.stable]). If [first1, last1) contains m elements that are
// equivalent to each other and [first2, last2) contains n elements that are
// equivalent to them, then all m elements from the first range are copied to the
- // output range, in order, and then the final max(n−m,0) elements from the second
+ // output range, in order, and then the final max(n-m,0) elements from the second
// range are copied to the output range, in order.
{
std::array<IntAndOrder, 3> r1{{{0, 0}, {0, 1}, {0, 2}}};
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
index b3c0a0d76eda1..c79f752b5de59 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
@@ -191,8 +191,8 @@ test_pointer_sort()
// way that they would invoke O(N^2) behavior on any quick sort implementation
// that satisifies certain conditions. Details are available in the following
// paper:
-// "A Killer Adversary for Quicksort", M. D. McIlroy, Software—Practice &
-// ExperienceVolume 29 Issue 4 April 10, 1999 pp 341–344.
+// "A Killer Adversary for Quicksort", M. D. McIlroy, Software-Practice &
+// Experience Volume 29 Issue 4 April 10, 1999 pp 341-344.
// https://dl.acm.org/doi/10.5555/311868.311871.
struct AdversaryComparator {
AdversaryComparator(int N, std::vector<int>& input) : gas(N - 1), V(input) {
diff --git a/libcxx/test/std/containers/sequences/list/list.ops/remove.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/remove.pass.cpp
index 8c9a06273f3e3..0bfcb6e89d650 100644
--- a/libcxx/test/std/containers/sequences/list/list.ops/remove.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.ops/remove.pass.cpp
@@ -41,9 +41,9 @@ int main(int, char**) {
L c(a1, a1 + 4);
#if TEST_STD_VER > 17
assert(c.remove(3) == 1);
- ASSERT_SAME_TYPE(L::size_type, decltype(c.remove(3)));
+ ASSERT_SAME_TYPE(L::size_type, decltype(c.remove(3)));
#else
- ASSERT_SAME_TYPE(void, decltype(c.remove(3)));
+ ASSERT_SAME_TYPE(void, decltype(c.remove(3)));
c.remove(3);
#endif
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 be7ff85764cbe..b8503ef5eca45 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
@@ -49,10 +49,10 @@ int main(int, char**)
L c(a1, a1+4);
Predicate cp(g);
#if TEST_STD_VER > 17
- ASSERT_SAME_TYPE(L::size_type, decltype(c.remove_if(std::ref(cp))));
+ ASSERT_SAME_TYPE(L::size_type, decltype(c.remove_if(std::ref(cp))));
assert(c.remove_if(std::ref(cp)) == 2);
#else
- ASSERT_SAME_TYPE(void, decltype(c.remove_if(std::ref(cp))));
+ ASSERT_SAME_TYPE(void, decltype(c.remove_if(std::ref(cp))));
c.remove_if(std::ref(cp));
#endif
assert(c == std::list<int>(a2, a2+2));
diff --git a/libcxx/test/std/containers/sequences/list/list.ops/unique.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/unique.pass.cpp
index 85c4ec587c1ec..f78f6f152ae91 100644
--- a/libcxx/test/std/containers/sequences/list/list.ops/unique.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.ops/unique.pass.cpp
@@ -25,10 +25,10 @@ int main(int, char**)
typedef std::list<int> L;
L c(a1, a1+sizeof(a1)/sizeof(a1[0]));
#if TEST_STD_VER > 17
- ASSERT_SAME_TYPE(L::size_type, decltype(c.unique()));
+ ASSERT_SAME_TYPE(L::size_type, decltype(c.unique()));
assert(c.unique() == 5);
#else
- ASSERT_SAME_TYPE(void, decltype(c.unique()));
+ ASSERT_SAME_TYPE(void, decltype(c.unique()));
c.unique();
#endif
assert(c == std::list<int>(a2, a2+4));
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 8139ddd36c192..a33cad8e1a221 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
@@ -40,10 +40,10 @@ int main(int, char**)
typedef std::list<int> L;
L c(a1, a1+sizeof(a1)/sizeof(a1[0]));
#if TEST_STD_VER > 17
- ASSERT_SAME_TYPE(L::size_type, decltype(c.unique(g)));
+ ASSERT_SAME_TYPE(L::size_type, decltype(c.unique(g)));
assert(c.unique(g) == 5);
#else
- ASSERT_SAME_TYPE(void, decltype(c.unique(g)));
+ ASSERT_SAME_TYPE(void, decltype(c.unique(g)));
c.unique(g);
#endif
assert(c == std::list<int>(a2, a2+4));
diff --git a/libcxx/test/std/containers/views/views.span/span.cons/array.fail.cpp b/libcxx/test/std/containers/views/views.span/span.cons/array.fail.cpp
index 27d3ef78b9e8c..74682167c6d27 100644
--- a/libcxx/test/std/containers/views/views.span/span.cons/array.fail.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.cons/array.fail.cpp
@@ -17,8 +17,8 @@
// constexpr span(const array<value_type, N>& arr) noexcept;
//
// Remarks: These constructors shall not participate in overload resolution unless:
-// — extent == dynamic_extent || N == extent is true, and
-// — remove_pointer_t<decltype(data(arr))>(*)[] is convertible to ElementType(*)[].
+// - extent == dynamic_extent || N == extent is true, and
+// - remove_pointer_t<decltype(data(arr))>(*)[] is convertible to ElementType(*)[].
//
diff --git a/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
index fdee1f4ec8a76..ce03c4fa92475 100644
--- a/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
@@ -13,8 +13,8 @@
// constexpr span(element_type (&arr)[N]) noexcept;
//
// Remarks: These constructors shall not participate in overload resolution unless:
-// — extent == dynamic_extent || N == extent is true, and
-// — remove_pointer_t<decltype(data(arr))>(*)[] is convertible to ElementType(*)[].
+// - extent == dynamic_extent || N == extent is true, and
+// - remove_pointer_t<decltype(data(arr))>(*)[] is convertible to ElementType(*)[].
//
diff --git a/libcxx/test/std/containers/views/views.span/span.cons/stdarray.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/stdarray.pass.cpp
index ae30cefed209b..97aa349fdcbc6 100644
--- a/libcxx/test/std/containers/views/views.span/span.cons/stdarray.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.cons/stdarray.pass.cpp
@@ -15,8 +15,8 @@
// constexpr span(const array<value_type, N>& arr) noexcept;
//
// Remarks: These constructors shall not participate in overload resolution unless:
-// — extent == dynamic_extent || N == extent is true, and
-// — remove_pointer_t<decltype(data(arr))>(*)[] is convertible to ElementType(*)[].
+// - extent == dynamic_extent || N == extent is true, and
+// - remove_pointer_t<decltype(data(arr))>(*)[] is convertible to ElementType(*)[].
//
diff --git a/libcxx/test/std/experimental/utilities/meta/meta.detect/nonesuch.fail.cpp b/libcxx/test/std/experimental/utilities/meta/meta.detect/nonesuch.fail.cpp
index cd3adf5b0ce52..69768c35b0281 100644
--- a/libcxx/test/std/experimental/utilities/meta/meta.detect/nonesuch.fail.cpp
+++ b/libcxx/test/std/experimental/utilities/meta/meta.detect/nonesuch.fail.cpp
@@ -10,9 +10,9 @@
// <experimental/type_traits>
//
// struct nonesuch;
-// nonesuch has no default constructor (C++17 §15.1)
-// or initializer-list constructor (C++17 §11.6.4),
-// and is not an aggregate (C++17 §11.6.1).
+// nonesuch has no default constructor (C++17 section 15.1)
+// or initializer-list constructor (C++17 section 11.6.4),
+// and is not an aggregate (C++17 section 11.6.1).
#include <experimental/type_traits>
diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp
index 42de65e403391..a3454ef88913d 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp
@@ -76,7 +76,7 @@ int main(int, char**) {
// p3: Replace each directory-separator with a preferred-separator.
// [ Note: The generic pathname grammar ([fs.path.generic]) defines
// directory-separator as one or more slashes and preferred-separators.
- // — end note ]
+ // - end note ]
{"/", "/"},
{"//", "/"},
{"///", "/"},
@@ -108,7 +108,7 @@ int main(int, char**) {
{"foo/bar/./../", "foo/"},
// p6: If there is a root-directory, remove all dot-dot filenames and any
// directory-separators immediately following them. [ Note: These dot-dot
- // filenames attempt to refer to nonexistent parent directories. — end note ]
+ // filenames attempt to refer to nonexistent parent directories. - end note ]
{"/..", "/"},
{"/../", "/"},
{"/foo/../..", "/"},
diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
index 521dbb810fdf9..2c809f6127a73 100644
--- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
@@ -83,7 +83,7 @@ int main(int, char**)
f.put(cpp17_output_iterator<char*>(str), ios, '*', &t, pat.data(), pat.data() + pat.size());
std::string ex(str, base(iter));
#if defined(_WIN32) || defined(__APPLE__) || defined(_AIX)
- // These platforms have no alternative
+ // These platforms have no alternative
assert(ex == "Today is \xE5\x9C\x9F\xE6\x9B\x9C\xE6\x97\xA5 which is the 6th day or alternatively 6.");
#else
assert(ex == "Today is \xE5\x9C\x9F\xE6\x9B\x9C\xE6\x97\xA5 which is the 6th day or alternatively \xE5\x85\xAD.");
diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp
index ba586ba92b22a..4c4c901be2c94 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp
@@ -12,7 +12,7 @@
// constexpr T bit_ceil(T x) noexcept;
// Remarks: This function shall not participate in overload resolution unless
-// T is an unsigned integer type
+// T is an unsigned integer type
#include <bit>
#include <cstdint>
@@ -28,25 +28,25 @@ enum class E2 : unsigned char { red };
template <typename T>
constexpr bool toobig()
{
- return 0 == std::bit_ceil(std::numeric_limits<T>::max());
+ return 0 == std::bit_ceil(std::numeric_limits<T>::max());
}
int main(int, char**)
{
-// Make sure we generate a compile-time error for UB
- static_assert(toobig<unsigned char>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<unsigned short>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<unsigned>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<unsigned long>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<unsigned long long>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
-
- static_assert(toobig<uint8_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<uint16_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<uint32_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<uint64_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<size_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<uintmax_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
- static_assert(toobig<uintptr_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
-
- return 0;
+ // Make sure we generate a compile-time error for UB
+ static_assert(toobig<unsigned char>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<unsigned short>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<unsigned>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<unsigned long>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<unsigned long long>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+
+ static_assert(toobig<uint8_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<uint16_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<uint32_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<uint64_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<size_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<uintmax_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+ static_assert(toobig<uintptr_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+
+ return 0;
}
diff --git a/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp
index 83ea03f3817eb..884ac942b196c 100644
--- a/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp
+++ b/libcxx/test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp
@@ -63,7 +63,7 @@ test_use_move()
// don't have the support yet. In these cases omit the constexpr test.
// FIXME Remove constexpr string workaround introduced in D90569
#if TEST_STD_VER > 17 && \
- (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
+ (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
void
#else
TEST_CONSTEXPR_CXX20 void
@@ -114,8 +114,8 @@ test()
// don't have the support yet. In these cases omit the constexpr test.
// FIXME Remove constexpr string workaround introduced in D90569
#if TEST_STD_VER > 17 && \
- (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
- if (!std::is_constant_evaluated())
+ (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
+ if (!std::is_constant_evaluated())
#endif
test_string();
diff --git a/libcxx/test/std/numerics/numeric.ops/adjacent.
diff erence/adjacent_
diff erence_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/adjacent.
diff erence/adjacent_
diff erence_op.pass.cpp
index 6917d98565ade..86c55d3c0bf67 100644
--- a/libcxx/test/std/numerics/numeric.ops/adjacent.
diff erence/adjacent_
diff erence_op.pass.cpp
+++ b/libcxx/test/std/numerics/numeric.ops/adjacent.
diff erence/adjacent_
diff erence_op.pass.cpp
@@ -70,7 +70,7 @@ test_use_move()
// don't have the support yet. In these cases omit the constexpr test.
// FIXME Remove constexpr string workaround introduced in D90569
#if TEST_STD_VER > 17 && \
- (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
+ (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
void
#else
TEST_CONSTEXPR_CXX20 void
@@ -183,8 +183,8 @@ test()
// don't have the support yet. In these cases omit the constexpr test.
// FIXME Remove constexpr string workaround introduced in D90569
#if TEST_STD_VER > 17 && \
- (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
- if (!std::is_constant_evaluated())
+ (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
+ if (!std::is_constant_evaluated())
#endif
test_string();
diff --git a/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp b/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp
index 13cc3291eef20..250e9e8663d2a 100644
--- a/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp
+++ b/libcxx/test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp
@@ -77,7 +77,7 @@ test_use_move()
// don't have the support yet. In these cases omit the constexpr test.
// FIXME Remove constexpr string workaround introduced in D90569
#if TEST_STD_VER > 17 && \
- (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
+ (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
void
#else
TEST_CONSTEXPR_CXX20 void
@@ -154,8 +154,8 @@ test()
// don't have the support yet. In these cases omit the constexpr test.
// FIXME Remove constexpr string workaround introduced in D90569
#if TEST_STD_VER > 17 && \
- (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
- if (!std::is_constant_evaluated())
+ (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
+ if (!std::is_constant_evaluated())
#endif
test_string();
diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
index e88cf88d86e06..6103f3e87d4f1 100644
--- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
+++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
@@ -95,31 +95,31 @@ void fp_test()
#if defined(__PPC__) && (defined(__LONG_DOUBLE_128__) && __LONG_DOUBLE_128__) && \
!(defined(__LONG_DOUBLE_IEEE128__) && __LONG_DOUBLE_IEEE128__)
-// For 128 bit long double implemented as 2 doubles on PowerPC,
-// nextafterl() of libm gives imprecise results which fails the
-// midpoint() tests below. So skip the test for this case.
+// For 128 bit long double implemented as 2 doubles on PowerPC,
+// nextafterl() of libm gives imprecise results which fails the
+// midpoint() tests below. So skip the test for this case.
if constexpr (sizeof(T) != 16)
#endif
{
- // Since there's nothing in between, the midpoint has to be one or the other
- T res;
- res = std::midpoint(d0, d1);
- assert(res == d0 || res == d1);
- assert(d0 <= res);
- assert(res <= d1);
- res = std::midpoint(d1, d0);
- assert(res == d0 || res == d1);
- assert(d0 <= res);
- assert(res <= d1);
-
- res = std::midpoint(d1, d2);
- assert(res == d1 || res == d2);
- assert(d1 <= res);
- assert(res <= d2);
- res = std::midpoint(d2, d1);
- assert(res == d1 || res == d2);
- assert(d1 <= res);
- assert(res <= d2);
+ // Since there's nothing in between, the midpoint has to be one or the other
+ T res;
+ res = std::midpoint(d0, d1);
+ assert(res == d0 || res == d1);
+ assert(d0 <= res);
+ assert(res <= d1);
+ res = std::midpoint(d1, d0);
+ assert(res == d0 || res == d1);
+ assert(d0 <= res);
+ assert(res <= d1);
+
+ res = std::midpoint(d1, d2);
+ assert(res == d1 || res == d2);
+ assert(d1 <= res);
+ assert(res <= d2);
+ res = std::midpoint(d2, d1);
+ assert(res == d1 || res == d2);
+ assert(d1 <= res);
+ assert(res <= d2);
}
}
diff --git a/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp
index c4d9d26bd845f..42ec305bf2b85 100644
--- a/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp
+++ b/libcxx/test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp
@@ -69,7 +69,7 @@ test_use_move()
// don't have the support yet. In these cases omit the constexpr test.
// FIXME Remove constexpr string workaround introduced in D90569
#if TEST_STD_VER > 17 && \
- (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
+ (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
void
#else
TEST_CONSTEXPR_CXX20 void
@@ -137,8 +137,8 @@ test()
// don't have the support yet. In these cases omit the constexpr test.
// FIXME Remove constexpr string workaround introduced in D90569
#if TEST_STD_VER > 17 && \
- (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
- if (!std::is_constant_evaluated())
+ (!defined(__cpp_lib_constexpr_string) || __cpp_lib_constexpr_string < 201907L)
+ if (!std::is_constant_evaluated())
#endif
test_string();
diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp
index 06d9c571c9a87..332973da96f38 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp
@@ -10,7 +10,7 @@
// constexpr auto begin();
// constexpr auto begin() const
-// requires input_range<const V> &&
+// requires input_range<const V> &&
// is_reference_v<range_reference_t<const V>>;
#include <cassert>
@@ -119,7 +119,7 @@ constexpr bool test() {
static_assert(HasConstBegin<decltype(jv)>);
}
- // !input_range<const V>
+ // !input_range<const V>
{
std::ranges::join_view jv{ConstNotRange{}};
static_assert(!HasConstBegin<decltype(jv)>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp
index ea33739809605..76abcd4746f7e 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp
@@ -10,8 +10,8 @@
// constexpr iterator(iterator<!Const> i)
// requires Const &&
-// convertible_to<iterator_t<V>, OuterIter> &&
-// convertible_to<iterator_t<InnerRng>, InnerIter>;
+// convertible_to<iterator_t<V>, OuterIter> &&
+// convertible_to<iterator_t<InnerRng>, InnerIter>;
#include <cassert>
#include <ranges>
diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp
index 4de67e94270e0..eb2c34ce9b690 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp
@@ -9,13 +9,13 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// constexpr iterator& operator--();
-// requires ref-is-glvalue && bidirectional_range<Base> &&
-// bidirectional_range<range_reference_t<Base>> &&
-// common_range<range_reference_t<Base>>;
+// requires ref-is-glvalue && bidirectional_range<Base> &&
+// bidirectional_range<range_reference_t<Base>> &&
+// common_range<range_reference_t<Base>>;
// constexpr iterator operator--(int);
-// requires ref-is-glvalue && bidirectional_range<Base> &&
-// bidirectional_range<range_reference_t<Base>> &&
-// common_range<range_reference_t<Base>>;
+// requires ref-is-glvalue && bidirectional_range<Base> &&
+// bidirectional_range<range_reference_t<Base>> &&
+// common_range<range_reference_t<Base>>;
#include <cassert>
#include <ranges>
@@ -124,7 +124,7 @@ constexpr bool test() {
}
{
- // !bidirectional_range<Base>
+ // !bidirectional_range<Base>
BidiCommonInner inners[2] = {buffer[0], buffer[1]};
SimpleForwardCommonOuter<BidiCommonInner> outer{inners};
std::ranges::join_view jv(outer);
@@ -132,7 +132,7 @@ constexpr bool test() {
}
{
- // !bidirectional_range<range_reference_t<Base>>
+ // !bidirectional_range<range_reference_t<Base>>
ForwardCommonInner inners[2] = {buffer[0], buffer[1]};
std::ranges::join_view jv(inners);
noDecrementTest(jv);
@@ -141,7 +141,7 @@ constexpr bool test() {
{
// LWG3313 `join_view::iterator::operator--` is incorrectly constrained
// `join_view::iterator` should not have `operator--` if
- // !common_range<range_reference_t<Base>>
+ // !common_range<range_reference_t<Base>>
BidiNonCommonInner inners[2] = {buffer[0], buffer[1]};
std::ranges::join_view jv(inners);
auto iter = jv.begin();
diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp
index d78edf2a6e724..057f75b9e5252 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp
@@ -11,7 +11,7 @@
// constexpr iterator& operator++();
// constexpr void operator++(int);
// constexpr iterator operator++(int)
-// requires ref-is-glvalue && forward_range<Base> &&
+// requires ref-is-glvalue && forward_range<Base> &&
// forward_range<range_reference_t<Base>>;
#include <cassert>
@@ -186,7 +186,7 @@ constexpr bool test() {
}
{
- // !forward_range<Base>
+ // !forward_range<Base>
BufferView<int*> inners[2] = {buffer1[0], buffer1[1]};
using Outer = SimpleInputCommonOuter<BufferView<int*>>;
std::ranges::join_view jv{Outer(inners)};
diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
index eb4873b1584b8..4bd8025efb5c1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
@@ -9,7 +9,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// constexpr sentinel(sentinel<!Const> s);
-// requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
+// requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
#include <cassert>
#include <ranges>
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp
index b9f7c1ce7315e..ce7858f1a8921 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp
@@ -16,7 +16,7 @@
// x - y;
// All the arithmetic operators have the constraint `requires all-random-access<Const, Views...>;`,
// except `operator-(x, y)` which instead has the constraint
-// `requires (sized_sentinel_for<iterator_t<maybe-const<Const, Views>>,
+// `requires (sized_sentinel_for<iterator_t<maybe-const<Const, Views>>,
// iterator_t<maybe-const<Const, Views>>> && ...);`
#include <ranges>
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
index 3bb126fda7ea4..f39c63519d263 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
@@ -9,7 +9,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
// friend constexpr bool operator==(const iterator& x, const iterator& y)
-// requires (equality_comparable<iterator_t<maybe-const<Const, Views>>> && ...);
+// requires (equality_comparable<iterator_t<maybe-const<Const, Views>>> && ...);
// friend constexpr bool operator<(const iterator& x, const iterator& y)
// requires all-random-access<Const, Views...>;
// friend constexpr bool operator>(const iterator& x, const iterator& y)
@@ -20,7 +20,7 @@
// requires all-random-access<Const, Views...>;
// friend constexpr auto operator<=>(const iterator& x, const iterator& y)
// requires all-random-access<Const, Views...> &&
-// (three_way_comparable<iterator_t<maybe-const<Const, Views>>> && ...);
+// (three_way_comparable<iterator_t<maybe-const<Const, Views>>> && ...);
#include <ranges>
#include <compare>
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.pass.cpp
index f449f501ad6d7..7f9784e6f7ae2 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.pass.cpp
@@ -9,7 +9,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
// constexpr iterator(iterator<!Const> i)
-// requires Const && (convertible_to<iterator_t<Views>,
+// requires Const && (convertible_to<iterator_t<Views>,
// iterator_t<maybe-const<Const, Views>>> && ...);
#include <ranges>
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 1ee7d5c1760ca..0c59f8b777a76 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
@@ -9,7 +9,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
// friend constexpr void iter_swap(const iterator& l, const iterator& r) noexcept(see below)
-// requires (indirectly_swappable<iterator_t<maybe-const<Const, Views>>> && ...);
+// requires (indirectly_swappable<iterator_t<maybe-const<Const, Views>>> && ...);
#include <array>
#include <cassert>
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
index f5c5892f6220d..7f8b513a97717 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
@@ -12,7 +12,7 @@
// requires(sized_sentinel_for<sentinel_t<maybe-const<Const, Views>>,
// iterator_t<maybe-const<OtherConst, Views>>>&&...)
// friend constexpr common_type_t<range_
diff erence_t<maybe-const<OtherConst, Views>>...>
-// operator-(const iterator<OtherConst>&, const sentinel&)
+// operator-(const iterator<OtherConst>&, const sentinel&)
//
// template <bool OtherConst>
// requires(sized_sentinel_for<sentinel_t<maybe-const<Const, Views>>,
diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp
index adb446a88c173..593dd9d0ec51d 100644
--- a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp
+++ b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp
@@ -9,10 +9,10 @@
// <regex>
// UNSUPPORTED: c++03, c++11, c++14
-// template <class InputIterator, class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
-// vector(InputIterator, InputIterator, Allocator = Allocator())
-// -> vector<typename iterator_traits<InputIterator>::value_type, Allocator>;
-//
+// template<class ForwardIterator>
+// basic_regex(ForwardIterator, ForwardIterator,
+// regex_constants::syntax_option_type = regex_constants::ECMAScript)
+// -> basic_regex<typename iterator_traits<ForwardIterator>::value_type>;
#include <regex>
#include <string>
@@ -23,21 +23,18 @@
int main(int, char**)
{
-// Test the explicit deduction guides
+ // Test the explicit deduction guides
{
-// basic_regex(ForwardIterator, ForwardIterator)
-// <int> is not an iterator
+ // basic_regex(ForwardIterator, ForwardIterator)
+ // <int> is not an iterator
std::basic_regex re(23, 34); // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_regex'}}
}
{
-// basic_regex(ForwardIterator, ForwardIterator, flag_type)
-// <double> is not an iterator
+ // basic_regex(ForwardIterator, ForwardIterator, flag_type)
+ // <double> is not an iterator
std::basic_regex re(23.0, 34.0, std::regex_constants::basic); // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_regex'}}
}
-// Test the implicit deduction guides
-
-
- return 0;
+ return 0;
}
diff --git a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp
index 0fe2f68e0e8ea..f9ef5b60a86ef 100644
--- a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp
@@ -17,7 +17,7 @@
// Returns: If x.ok() == true and y.ok() == true, returns a value m in the range
// [months{0}, months{11}] satisfying y + m == x.
// Otherwise the value returned is unspecified.
-// [Example: January - February == months{11}. —end example]
+// [Example: January - February == months{11}. -end example]
#include <chrono>
#include <type_traits>
diff --git a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp
index c40aef055301f..297df138ffc5e 100644
--- a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp
@@ -20,8 +20,8 @@
// [Note: Given a divisor of 12, Euclidean division truncates towards negative infinity
// and always produces a remainder in the range of [0, 11].
// Assuming no overflow in the signed summation, this operation results in a month
-// holding a value in the range [1, 12] even if !x.ok(). —end note]
-// [Example: February + months{11} == January. —end example]
+// holding a value in the range [1, 12] even if !x.ok(). -end note]
+// [Example: February + months{11} == January. -end example]
diff --git a/libcxx/test/std/time/time.cal/time.cal.operators/month_day.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.operators/month_day.pass.cpp
index 41fad0e415c68..1def28f7a0144 100644
--- a/libcxx/test/std/time/time.cal/time.cal.operators/month_day.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.operators/month_day.pass.cpp
@@ -30,7 +30,6 @@
// operator/(const day& d, int m) noexcept;
// Returns: month(m) / d.
-
#include <chrono>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/time/time.cal/time.cal.operators/month_day_last.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.operators/month_day_last.pass.cpp
index fdf241a12373c..751a531bbf9e0 100644
--- a/libcxx/test/std/time/time.cal/time.cal.operators/month_day_last.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.operators/month_day_last.pass.cpp
@@ -28,7 +28,7 @@
//
//
// [Note: A month_day_last object can be constructed using the expression m/last or last/m,
-// where m is an expression of type month. — end note]
+// where m is an expression of type month. - end note]
// [Example:
// constexpr auto mdl = February/last; // mdl is the last day of February of an as yet unspecified year
// static_assert(mdl.month() == February);
diff --git a/libcxx/test/std/time/time.cal/time.cal.operators/month_weekday.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.operators/month_weekday.pass.cpp
index 1375550929ebb..31888b3c21241 100644
--- a/libcxx/test/std/time/time.cal/time.cal.operators/month_weekday.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.operators/month_weekday.pass.cpp
@@ -26,16 +26,12 @@
// operator/(const weekday_indexed& wdi, int m) noexcept;
// Returns: month(m) / wdi.
-
//
// [Example:
// constexpr auto mwd = February/Tuesday[3]; // mwd is the third Tuesday of February of an as yet unspecified year
// static_assert(mwd.month() == February);
// static_assert(mwd.weekday_indexed() == Tuesday[3]);
-// —end example]
-
-
-
+// -end example]
#include <chrono>
#include <type_traits>
diff --git a/libcxx/test/std/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp
index 97451f0d75b7d..5f5e1e7398931 100644
--- a/libcxx/test/std/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp
@@ -26,9 +26,6 @@
// operator/(const weekday_last& wdl, int m) noexcept;
// Returns: month(m) / wdl.
-
-
-
#include <chrono>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/time/time.cal/time.cal.operators/year_month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.operators/year_month.pass.cpp
index b59e8e1a8b7bb..2691d32967c6e 100644
--- a/libcxx/test/std/time/time.cal/time.cal.operators/year_month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.operators/year_month.pass.cpp
@@ -16,8 +16,6 @@
// constexpr year_month operator/(const year& y, int m) noexcept;
// Returns: y / month(m).
-
-
#include <chrono>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/time/time.cal/time.cal.operators/year_month_day.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.operators/year_month_day.pass.cpp
index 3c4371a9d1a5b..742207dbdbc63 100644
--- a/libcxx/test/std/time/time.cal/time.cal.operators/year_month_day.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.operators/year_month_day.pass.cpp
@@ -34,7 +34,6 @@
// operator/(const month_day& md, int y) noexcept;
// Returns: year(y) / md.
-
#include <chrono>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp
index 00ddda6858e57..68ae5e9fd2e21 100644
--- a/libcxx/test/std/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp
@@ -30,7 +30,6 @@
// operator/(const month_day_last& mdl, int y) noexcept;
// Returns: year(y) / mdl.
-
#include <chrono>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp
index 33258b76d468a..988daf0d5b227 100644
--- a/libcxx/test/std/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp
@@ -30,8 +30,6 @@
// operator/(const month_weekday_last& mwdl, int y) noexcept;
// Returns: year(y) / mwdl.
-
-
#include <chrono>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp
index 7c0fb39bb1a94..b2127d3eb17ee 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp
@@ -21,7 +21,7 @@
//
// [Example:
// If dp represents 1970-01-01, the constructed weekday represents Thursday by storing 4 in wd_.
-// —end example]
+// -end example]
#include <chrono>
#include <type_traits>
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp
index dc010d6dd9e12..d8777b7cdc605 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp
@@ -21,7 +21,7 @@
//
// [Example:
// If dp represents 1970-01-01, the constructed weekday represents Thursday by storing 4 in wd_.
-// —end example]
+// -end example]
#include <chrono>
#include <type_traits>
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp
index 434662ba6c8a5..0daf37ba9bde0 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp
@@ -17,7 +17,7 @@
// Returns: If x.ok() == true and y.ok() == true, returns a value d in the range
// [days{0}, days{6}] satisfying y + d == x.
// Otherwise the value returned is unspecified.
-// [Example: Sunday - Monday == days{6}. —end example]
+// [Example: Sunday - Monday == days{6}. -end example]
#include <chrono>
#include <type_traits>
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp
index 1adcee8f8ede2..4820d51d11f24 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp
@@ -20,10 +20,8 @@
// [Note: Given a divisor of 12, Euclidean division truncates towards negative infinity
// and always produces a remainder in the range of [0, 6].
// Assuming no overflow in the signed summation, this operation results in a weekday
-// holding a value in the range [0, 6] even if !x.ok(). —end note]
-// [Example: Monday + days{6} == Sunday. —end example]
-
-
+// holding a value in the range [0, 6] even if !x.ok(). -end note]
+// [Example: Monday + days{6} == Sunday. -end example]
#include <chrono>
#include <type_traits>
diff --git a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp
index b38110772fc51..e15228ba080a4 100644
--- a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp
@@ -17,7 +17,7 @@
// Returns: If x.ok() == true and y.ok() == true, returns a value m in the range
// [years{0}, years{11}] satisfying y + m == x.
// Otherwise the value returned is unspecified.
-// [Example: January - February == years{11}. —end example]
+// [Example: January - February == years{11}. -end example]
#include <chrono>
#include <type_traits>
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp
index 54f6d84452f2c..cc882d7569eaf 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp
@@ -27,7 +27,7 @@
// static_assert(year_month_day{local_days{2017y/January/0}} == 2016y/December/31);
// static_assert(year_month_day{local_days{2017y/January/31}} == 2017y/January/31);
// static_assert(year_month_day{local_days{2017y/January/32}} == 2017y/February/1);
-// —end example]
+// -end example]
#include <chrono>
#include <type_traits>
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
index 195ddfb72d053..ec252eaa11dbd 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
@@ -27,7 +27,7 @@
// static_assert(year_month_day{sys_days{2017y/January/0}} == 2016y/December/31);
// static_assert(year_month_day{sys_days{2017y/January/31}} == 2017y/January/31);
// static_assert(year_month_day{sys_days{2017y/January/32}} == 2017y/February/1);
-// —end example]
+// -end example]
#include <chrono>
#include <type_traits>
diff --git a/libcxx/test/std/time/time.clock/time.clock.system/local_time.types.pass.cpp b/libcxx/test/std/time/time.clock/time.clock.system/local_time.types.pass.cpp
index 8a99c1a988cd5..c012b98e9b79b 100644
--- a/libcxx/test/std/time/time.clock/time.clock.system/local_time.types.pass.cpp
+++ b/libcxx/test/std/time/time.clock/time.clock.system/local_time.types.pass.cpp
@@ -17,8 +17,8 @@
// [Example:
// sys_seconds{sys_days{1970y/January/1}}.time_since_epoch() is 0s.
-// sys_seconds{sys_days{2000y/January/1}}.time_since_epoch() is 946’684’800s, which is 10’957 * 86’400s.
-// —end example]
+// sys_seconds{sys_days{2000y/January/1}}.time_since_epoch() is 946'684'800s, which is 10'957 * 86'400s.
+// - end example]
#include <chrono>
diff --git a/libcxx/test/std/time/time.clock/time.clock.system/sys.time.types.pass.cpp b/libcxx/test/std/time/time.clock/time.clock.system/sys.time.types.pass.cpp
index 9aeaf013aabbc..206967acf5fc0 100644
--- a/libcxx/test/std/time/time.clock/time.clock.system/sys.time.types.pass.cpp
+++ b/libcxx/test/std/time/time.clock/time.clock.system/sys.time.types.pass.cpp
@@ -16,8 +16,8 @@
// [Example:
// sys_seconds{sys_days{1970y/January/1}}.time_since_epoch() is 0s.
-// sys_seconds{sys_days{2000y/January/1}}.time_since_epoch() is 946’684’800s, which is 10’957 * 86’400s.
-// —end example]
+// sys_seconds{sys_days{2000y/January/1}}.time_since_epoch() is 946'684'800s, which is 10'957 * 86'400s.
+// - end example]
#include <chrono>
diff --git a/libcxx/test/std/time/time.hms/time.12/is_am.pass.cpp b/libcxx/test/std/time/time.hms/time.12/is_am.pass.cpp
index 3da5371c21c17..a2af7d02894d4 100644
--- a/libcxx/test/std/time/time.hms/time.12/is_am.pass.cpp
+++ b/libcxx/test/std/time/time.hms/time.12/is_am.pass.cpp
@@ -19,19 +19,19 @@
int main(int, char**)
{
- using hours = std::chrono::hours;
- ASSERT_SAME_TYPE(bool, decltype(std::chrono::is_am(std::declval<hours>())));
- ASSERT_NOEXCEPT( std::chrono::is_am(std::declval<hours>()));
+ using hours = std::chrono::hours;
+ ASSERT_SAME_TYPE(bool, decltype(std::chrono::is_am(std::declval<hours>())));
+ ASSERT_NOEXCEPT( std::chrono::is_am(std::declval<hours>()));
- static_assert( std::chrono::is_am(hours( 0)), "");
- static_assert( std::chrono::is_am(hours(11)), "");
- static_assert(!std::chrono::is_am(hours(12)), "");
- static_assert(!std::chrono::is_am(hours(23)), "");
+ static_assert( std::chrono::is_am(hours( 0)), "");
+ static_assert( std::chrono::is_am(hours(11)), "");
+ static_assert(!std::chrono::is_am(hours(12)), "");
+ static_assert(!std::chrono::is_am(hours(23)), "");
- for (int i = 0; i < 12; ++i)
- assert( std::chrono::is_am(hours(i)));
- for (int i = 12; i < 24; ++i)
- assert(!std::chrono::is_am(hours(i)));
+ for (int i = 0; i < 12; ++i)
+ assert( std::chrono::is_am(hours(i)));
+ for (int i = 12; i < 24; ++i)
+ assert(!std::chrono::is_am(hours(i)));
return 0;
}
diff --git a/libcxx/test/std/time/time.hms/time.hms.members/is_negative.pass.cpp b/libcxx/test/std/time/time.hms/time.hms.members/is_negative.pass.cpp
index 06dee423d2dc7..51fa2d9a0e051 100644
--- a/libcxx/test/std/time/time.hms/time.hms.members/is_negative.pass.cpp
+++ b/libcxx/test/std/time/time.hms/time.hms.members/is_negative.pass.cpp
@@ -23,34 +23,34 @@
template <typename Duration>
constexpr bool check_neg(Duration d)
{
- ASSERT_SAME_TYPE(bool, decltype(std::declval<std::chrono::hh_mm_ss<Duration>>().is_negative()));
- ASSERT_NOEXCEPT( std::declval<std::chrono::hh_mm_ss<Duration>>().is_negative());
- return std::chrono::hh_mm_ss<Duration>(d).is_negative();
+ ASSERT_SAME_TYPE(bool, decltype(std::declval<std::chrono::hh_mm_ss<Duration>>().is_negative()));
+ ASSERT_NOEXCEPT( std::declval<std::chrono::hh_mm_ss<Duration>>().is_negative());
+ return std::chrono::hh_mm_ss<Duration>(d).is_negative();
}
int main(int, char**)
{
- using microfortnights = std::chrono::duration<int, std::ratio<756, 625>>;
+ using microfortnights = std::chrono::duration<int, std::ratio<756, 625>>;
- static_assert(!check_neg(std::chrono::minutes( 1)), "");
- static_assert( check_neg(std::chrono::minutes(-1)), "");
+ static_assert(!check_neg(std::chrono::minutes( 1)), "");
+ static_assert( check_neg(std::chrono::minutes(-1)), "");
- assert(!check_neg(std::chrono::seconds( 5000)));
- assert( check_neg(std::chrono::seconds(-5000)));
- assert(!check_neg(std::chrono::minutes( 5000)));
- assert( check_neg(std::chrono::minutes(-5000)));
- assert(!check_neg(std::chrono::hours( 11)));
- assert( check_neg(std::chrono::hours(-11)));
+ assert(!check_neg(std::chrono::seconds( 5000)));
+ assert( check_neg(std::chrono::seconds(-5000)));
+ assert(!check_neg(std::chrono::minutes( 5000)));
+ assert( check_neg(std::chrono::minutes(-5000)));
+ assert(!check_neg(std::chrono::hours( 11)));
+ assert( check_neg(std::chrono::hours(-11)));
- assert(!check_neg(std::chrono::milliseconds( 123456789LL)));
- assert( check_neg(std::chrono::milliseconds(-123456789LL)));
- assert(!check_neg(std::chrono::microseconds( 123456789LL)));
- assert( check_neg(std::chrono::microseconds(-123456789LL)));
- assert(!check_neg(std::chrono::nanoseconds( 123456789LL)));
- assert( check_neg(std::chrono::nanoseconds(-123456789LL)));
+ assert(!check_neg(std::chrono::milliseconds( 123456789LL)));
+ assert( check_neg(std::chrono::milliseconds(-123456789LL)));
+ assert(!check_neg(std::chrono::microseconds( 123456789LL)));
+ assert( check_neg(std::chrono::microseconds(-123456789LL)));
+ assert(!check_neg(std::chrono::nanoseconds( 123456789LL)));
+ assert( check_neg(std::chrono::nanoseconds(-123456789LL)));
- assert(!check_neg(microfortnights( 10000)));
- assert( check_neg(microfortnights(-10000)));
+ assert(!check_neg(microfortnights( 10000)));
+ assert( check_neg(microfortnights(-10000)));
- return 0;
+ return 0;
}
diff --git a/libcxx/test/std/time/time.hms/time.hms.members/precision.pass.cpp b/libcxx/test/std/time/time.hms/time.hms.members/precision.pass.cpp
index eb93c038acaf5..0d41182d9f068 100644
--- a/libcxx/test/std/time/time.hms/time.hms.members/precision.pass.cpp
+++ b/libcxx/test/std/time/time.hms/time.hms.members/precision.pass.cpp
@@ -26,57 +26,57 @@
#include "test_macros.h"
constexpr unsigned long long powers[] = {
- 1ULL,
- 10ULL,
- 100ULL,
- 1000ULL,
- 10000ULL,
- 100000ULL,
- 1000000ULL,
- 10000000ULL,
- 100000000ULL,
- 1000000000ULL,
- 10000000000ULL,
- 100000000000ULL,
- 1000000000000ULL,
- 10000000000000ULL,
- 100000000000000ULL,
- 1000000000000000ULL,
- 10000000000000000ULL,
- 100000000000000000ULL,
- 1000000000000000000ULL,
- 10000000000000000000ULL
+ 1ULL,
+ 10ULL,
+ 100ULL,
+ 1000ULL,
+ 10000ULL,
+ 100000ULL,
+ 1000000ULL,
+ 10000000ULL,
+ 100000000ULL,
+ 1000000000ULL,
+ 10000000000ULL,
+ 100000000000ULL,
+ 1000000000000ULL,
+ 10000000000000ULL,
+ 100000000000000ULL,
+ 1000000000000000ULL,
+ 10000000000000000ULL,
+ 100000000000000000ULL,
+ 1000000000000000000ULL,
+ 10000000000000000000ULL
};
template <typename Duration, unsigned width>
constexpr bool check_precision()
{
- using HMS = std::chrono::hh_mm_ss<Duration>;
- using CT = std::common_type_t<typename Duration::rep, std::chrono::seconds::rep>;
- using Pre = std::chrono::duration<CT, std::ratio<1, powers[width]>>;
- return std::is_same_v<typename HMS::precision, Pre>;
+ using HMS = std::chrono::hh_mm_ss<Duration>;
+ using CT = std::common_type_t<typename Duration::rep, std::chrono::seconds::rep>;
+ using Pre = std::chrono::duration<CT, std::ratio<1, powers[width]>>;
+ return std::is_same_v<typename HMS::precision, Pre>;
}
int main(int, char**)
{
- using microfortnights = std::chrono::duration<int, std::ratio<756, 625>>;
+ using microfortnights = std::chrono::duration<int, std::ratio<756, 625>>;
- static_assert( check_precision<std::chrono::hours, 0>(), "");
- static_assert( check_precision<std::chrono::minutes, 0>(), "");
- static_assert( check_precision<std::chrono::seconds, 0>(), "");
- static_assert( check_precision<std::chrono::milliseconds, 3>(), "");
- static_assert( check_precision<std::chrono::microseconds, 6>(), "");
- static_assert( check_precision<std::chrono::nanoseconds, 9>(), "");
- static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 2>>, 1>(), "");
- static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 3>>, 6>(), "");
- static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 4>>, 2>(), "");
- static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 5>>, 1>(), "");
- static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 6>>, 6>(), "");
- static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 7>>, 6>(), "");
- static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 8>>, 3>(), "");
- static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 9>>, 6>(), "");
- static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 10>>, 1>(), "");
- static_assert( check_precision<microfortnights, 4>(), "");
+ static_assert( check_precision<std::chrono::hours, 0>(), "");
+ static_assert( check_precision<std::chrono::minutes, 0>(), "");
+ static_assert( check_precision<std::chrono::seconds, 0>(), "");
+ static_assert( check_precision<std::chrono::milliseconds, 3>(), "");
+ static_assert( check_precision<std::chrono::microseconds, 6>(), "");
+ static_assert( check_precision<std::chrono::nanoseconds, 9>(), "");
+ static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 2>>, 1>(), "");
+ static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 3>>, 6>(), "");
+ static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 4>>, 2>(), "");
+ static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 5>>, 1>(), "");
+ static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 6>>, 6>(), "");
+ static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 7>>, 6>(), "");
+ static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 8>>, 3>(), "");
+ static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 9>>, 6>(), "");
+ static_assert( check_precision<std::chrono::duration<int, std::ratio< 1, 10>>, 1>(), "");
+ static_assert( check_precision<microfortnights, 4>(), "");
- return 0;
+ return 0;
}
diff --git a/libcxx/test/std/time/time.hms/time.hms.members/width.pass.cpp b/libcxx/test/std/time/time.hms/time.hms.members/width.pass.cpp
index e8a3c1f2bb6c3..adee920621f5b 100644
--- a/libcxx/test/std/time/time.hms/time.hms.members/width.pass.cpp
+++ b/libcxx/test/std/time/time.hms/time.hms.members/width.pass.cpp
@@ -15,7 +15,7 @@
// static unsigned constexpr fractional_width = see below;
// using precision = see below;
//
-// fractional_width is the number of fractional decimal digits represented by precision.
+// fractional_width is the number of fractional decimal digits represented by precision.
// fractional_width has the value of the smallest possible integer in the range [0, 18]
// such that precision will exactly represent all values of Duration.
// If no such value of fractional_width exists, then fractional_width is 6.
@@ -30,30 +30,30 @@
template <typename Duration, unsigned width>
constexpr bool check_width()
{
- using HMS = std::chrono::hh_mm_ss<Duration>;
- return HMS::fractional_width == width;
+ using HMS = std::chrono::hh_mm_ss<Duration>;
+ return HMS::fractional_width == width;
}
int main(int, char**)
{
- using microfortnights = std::chrono::duration<int, std::ratio<756, 625>>;
-
- static_assert( check_width<std::chrono::hours, 0>(), "");
- static_assert( check_width<std::chrono::minutes, 0>(), "");
- static_assert( check_width<std::chrono::seconds, 0>(), "");
- static_assert( check_width<std::chrono::milliseconds, 3>(), "");
- static_assert( check_width<std::chrono::microseconds, 6>(), "");
- static_assert( check_width<std::chrono::nanoseconds, 9>(), "");
- static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 2>>, 1>(), "");
- static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 3>>, 6>(), "");
- static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 4>>, 2>(), "");
- static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 5>>, 1>(), "");
- static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 6>>, 6>(), "");
- static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 7>>, 6>(), "");
- static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 8>>, 3>(), "");
- static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 9>>, 6>(), "");
- static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 10>>, 1>(), "");
- static_assert( check_width<microfortnights, 4>(), "");
-
- return 0;
+ using microfortnights = std::chrono::duration<int, std::ratio<756, 625>>;
+
+ static_assert( check_width<std::chrono::hours, 0>(), "");
+ static_assert( check_width<std::chrono::minutes, 0>(), "");
+ static_assert( check_width<std::chrono::seconds, 0>(), "");
+ static_assert( check_width<std::chrono::milliseconds, 3>(), "");
+ static_assert( check_width<std::chrono::microseconds, 6>(), "");
+ static_assert( check_width<std::chrono::nanoseconds, 9>(), "");
+ static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 2>>, 1>(), "");
+ static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 3>>, 6>(), "");
+ static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 4>>, 2>(), "");
+ static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 5>>, 1>(), "");
+ static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 6>>, 6>(), "");
+ static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 7>>, 6>(), "");
+ static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 8>>, 3>(), "");
+ static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 9>>, 6>(), "");
+ static_assert( check_width<std::chrono::duration<int, std::ratio< 1, 10>>, 1>(), "");
+ static_assert( check_width<microfortnights, 4>(), "");
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/format/format.functions/format.verify.cpp b/libcxx/test/std/utilities/format/format.functions/format.verify.cpp
index 48476a9e2599d..5ebc411533667 100644
--- a/libcxx/test/std/utilities/format/format.functions/format.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format.verify.cpp
@@ -95,10 +95,10 @@ struct tiny {
void P2418()
{
- auto t = tiny{};
- std::format("{}", t.bit); // expected-error{{non-const reference cannot bind to bit-field 'bit'}}
+ auto t = tiny{};
+ std::format("{}", t.bit); // expected-error{{non-const reference cannot bind to bit-field 'bit'}}
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
- std::format(L"{}", t.bit); // expected-error{{non-const reference cannot bind to bit-field 'bit'}}
+ std::format(L"{}", t.bit); // expected-error{{non-const reference cannot bind to bit-field 'bit'}}
#endif
}
diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
index 9e0612b9f6320..ccfc37a33dd87 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
@@ -116,9 +116,9 @@ int main(int, char**)
assert(globalMemCounter.checkOutstandingNewEq(1));
RTTI_ASSERT(f.target<A>());
RTTI_ASSERT(f.target<int(*)(int)>() == 0);
- LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
+ LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
#if TEST_STD_VER > 17
- ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
+ ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
#endif
std::function<int(int)> f2 = std::move(f);
assert(A::count == 1);
@@ -140,9 +140,9 @@ int main(int, char**)
assert(A::count == 1);
RTTI_ASSERT(f.target<A>() == nullptr);
RTTI_ASSERT(f.target<Ref>());
- LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
+ LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
#if TEST_STD_VER > 17
- ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
+ ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
#endif
std::function<int(int)> f2(std::move(f));
assert(A::count == 1);
@@ -161,9 +161,9 @@ int main(int, char**)
std::function<int(int)> f(p);
RTTI_ASSERT(f.target<A>() == nullptr);
RTTI_ASSERT(f.target<Ptr>());
- LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
+ LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
#if TEST_STD_VER > 17
- ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
+ ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
#endif
std::function<int(int)> f2(std::move(f));
RTTI_ASSERT(f2.target<A>() == nullptr);
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
index cb374fd5e9071..6cade6ae1f07b 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
@@ -19,8 +19,8 @@
template <class T, bool B>
void test_array_imp()
{
- static_assert( B == std::is_bounded_array<T>::value, "" );
- static_assert( B == std::is_bounded_array_v<T>, "" );
+ static_assert( B == std::is_bounded_array<T>::value, "" );
+ static_assert( B == std::is_bounded_array_v<T>, "" );
}
template <class T, bool B>
@@ -47,21 +47,21 @@ typedef void (*FunctionPtr)();
int main(int, char**)
{
-// Non-array types
- test_array<void, false>();
- test_array<std::nullptr_t, false>();
- test_array<int, false>();
- test_array<double, false>();
- test_array<void *, false>();
- test_array<int &, false>();
- test_array<int &&, false>();
+ // Non-array types
+ test_array<void, false>();
+ test_array<std::nullptr_t, false>();
+ test_array<int, false>();
+ test_array<double, false>();
+ test_array<void *, false>();
+ test_array<int &, false>();
+ test_array<int &&, false>();
test_array<Empty, false>();
test_array<Union, false>();
test_array<Abstract, false>();
test_array<Enum, false>();
test_array<FunctionPtr, false>();
-// Array types
+ // Array types
test_array<char[3], true>();
test_array<int[0], false>();
test_array<char[], false>();
diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
index b3230d4602329..263b162740881 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
@@ -23,25 +23,25 @@ struct NonDestructible { ~NonDestructible() = delete; };
int main(int, char**)
{
- {
- std::optional<char &> o1; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with a reference type is ill-formed}}
- std::optional<NonDestructible> o2; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with a non-destructible type is ill-formed}}
- std::optional<char[20]> o3; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with an array type is ill-formed}}
- }
-
- {
- std::optional< std::in_place_t> o1; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
- std::optional<const std::in_place_t> o2; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
- std::optional< volatile std::in_place_t> o3; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
- std::optional<const volatile std::in_place_t> o4; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
- }
-
- {
- std::optional< std::nullopt_t> o1; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
- std::optional<const std::nullopt_t> o2; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
- std::optional< volatile std::nullopt_t> o3; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
- std::optional<const volatile std::nullopt_t> o4; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
- }
-
- return 0;
+ {
+ std::optional<char &> o1; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with a reference type is ill-formed}}
+ std::optional<NonDestructible> o2; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with a non-destructible type is ill-formed}}
+ std::optional<char[20]> o3; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with an array type is ill-formed}}
+ }
+
+ {
+ std::optional< std::in_place_t> o1; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
+ std::optional<const std::in_place_t> o2; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
+ std::optional< volatile std::in_place_t> o3; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
+ std::optional<const volatile std::in_place_t> o4; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
+ }
+
+ {
+ std::optional< std::nullopt_t> o1; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
+ std::optional<const std::nullopt_t> o2; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
+ std::optional< volatile std::nullopt_t> o3; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
+ std::optional<const volatile std::nullopt_t> o4; // expected-error-re at optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
+ }
+
+ return 0;
}
diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
index 22b8d25ef5fd3..c3ab43d4509fb 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/cmp_nullptr.pass.cpp
@@ -35,7 +35,7 @@
// template <class T, class D>
// bool operator>=(nullptr_t, const unique_ptr<T, D>& y);
// template<class T, class D>
-// requires three_way_comparable<typename unique_ptr<T, D>::pointer>
+// requires three_way_comparable<typename unique_ptr<T, D>::pointer>
// constexpr compare_three_way_result_t<typename unique_ptr<T, D>::pointer>
// operator<=>(const unique_ptr<T, D>& x, nullptr_t); // C++20
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_const_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_const_move.pass.cpp
index a24fee7e79b58..e3488c4a45a19 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_const_move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_const_move.pass.cpp
@@ -18,12 +18,12 @@
// sizeof...(Types) equals sizeof...(UTypes) &&
// (is_constructible_v<Types, decltype(get<I>(FWD(u)))> && ...) is true &&
// (
-// sizeof...(Types) is not 1 ||
-// (
-// !is_convertible_v<decltype(u), T> &&
-// !is_constructible_v<T, decltype(u)> &&
-// !is_same_v<T, U>
-// )
+// sizeof...(Types) is not 1 ||
+// (
+// !is_convertible_v<decltype(u), T> &&
+// !is_constructible_v<T, decltype(u)> &&
+// !is_same_v<T, U>
+// )
// )
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_non_const_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_non_const_copy.pass.cpp
index 5c8249710f274..31913422be356 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_non_const_copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_non_const_copy.pass.cpp
@@ -18,12 +18,12 @@
// sizeof...(Types) equals sizeof...(UTypes) &&
// (is_constructible_v<Types, decltype(get<I>(FWD(u)))> && ...) is true &&
// (
-// sizeof...(Types) is not 1 ||
-// (
-// !is_convertible_v<decltype(u), T> &&
-// !is_constructible_v<T, decltype(u)> &&
-// !is_same_v<T, U>
-// )
+// sizeof...(Types) is not 1 ||
+// (
+// !is_convertible_v<decltype(u), T> &&
+// !is_constructible_v<T, decltype(u)> &&
+// !is_same_v<T, U>
+// )
// )
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp
index f2073257077aa..67008512ca348 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_non_const_pair.pass.cpp
@@ -11,8 +11,7 @@
// template <class... Types>
// template <class Alloc, class U1, class U2>
// constexpr explicit(see below)
-// tuple<Types...>::tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>&
-// u);
+// tuple<Types...>::tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>& u);
// Constraints:
// - sizeof...(Types) is 2 and
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_const_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_const_move.pass.cpp
index 30c11b3e22333..8c9f4d854f5aa 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_const_move.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_const_move.pass.cpp
@@ -17,12 +17,12 @@
// sizeof...(Types) equals sizeof...(UTypes) &&
// (is_constructible_v<Types, decltype(get<I>(FWD(u)))> && ...) is true &&
// (
-// sizeof...(Types) is not 1 ||
-// (
-// !is_convertible_v<decltype(u), T> &&
-// !is_constructible_v<T, decltype(u)> &&
-// !is_same_v<T, U>
-// )
+// sizeof...(Types) is not 1 ||
+// (
+// !is_convertible_v<decltype(u), T> &&
+// !is_constructible_v<T, decltype(u)> &&
+// !is_same_v<T, U>
+// )
// )
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_non_const_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_non_const_copy.pass.cpp
index bb2baba578704..7f325f23a7bfd 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_non_const_copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_non_const_copy.pass.cpp
@@ -16,12 +16,12 @@
// sizeof...(Types) equals sizeof...(UTypes) &&
// (is_constructible_v<Types, decltype(get<I>(FWD(u)))> && ...) is true &&
// (
-// sizeof...(Types) is not 1 ||
-// (
-// !is_convertible_v<decltype(u), T> &&
-// !is_constructible_v<T, decltype(u)> &&
-// !is_same_v<T, U>
-// )
+// sizeof...(Types) is not 1 ||
+// (
+// !is_convertible_v<decltype(u), T> &&
+// !is_constructible_v<T, decltype(u)> &&
+// !is_same_v<T, U>
+// )
// )
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
diff --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h
index f5cb137a053a1..840e596b6a940 100644
--- a/libcxx/test/support/filesystem_test_helper.h
+++ b/libcxx/test/support/filesystem_test_helper.h
@@ -328,20 +328,20 @@ struct scoped_test_env
/// This class generates the following tree:
///
/// static_test_env
-/// ├── bad_symlink -> dne
-/// ├── dir1
-/// │ ├── dir2
-/// │ │ ├── afile3
-/// │ │ ├── dir3
-/// │ │ │ └── file5
-/// │ │ ├── file4
-/// │ │ └── symlink_to_dir3 -> dir3
-/// │ ├── file1
-/// │ └── file2
-/// ├── empty_file
-/// ├── non_empty_file
-/// ├── symlink_to_dir -> dir1
-/// └── symlink_to_empty_file -> empty_file
+/// |-- bad_symlink -> dne
+/// |-- dir1
+/// | |-- dir2
+/// | | |-- afile3
+/// | | |-- dir3
+/// | | | `-- file5
+/// | | |-- file4
+/// | | `-- symlink_to_dir3 -> dir3
+/// | `-- file1
+/// | `-- file2
+/// |-- empty_file
+/// |-- non_empty_file
+/// |-- symlink_to_dir -> dir1
+/// `-- symlink_to_empty_file -> empty_file
///
class static_test_env {
scoped_test_env env_;
diff --git a/libcxx/test/support/fp_compare.h b/libcxx/test/support/fp_compare.h
index f14ea96f579e1..b7665ae0f2d89 100644
--- a/libcxx/test/support/fp_compare.h
+++ b/libcxx/test/support/fp_compare.h
@@ -17,29 +17,29 @@
template<typename T>
bool fptest_close(T val, T expected, T eps)
{
- constexpr T zero = T(0);
- assert(eps >= zero);
+ constexpr T zero = T(0);
+ assert(eps >= zero);
-// Handle the zero cases
- if (eps == zero) return val == expected;
- if (val == zero) return std::abs(expected) <= eps;
- if (expected == zero) return std::abs(val) <= eps;
+ // Handle the zero cases
+ if (eps == zero) return val == expected;
+ if (val == zero) return std::abs(expected) <= eps;
+ if (expected == zero) return std::abs(val) <= eps;
- return std::abs(val - expected) < eps
- && std::abs(val - expected)/std::abs(val) < eps;
+ return std::abs(val - expected) < eps
+ && std::abs(val - expected)/std::abs(val) < eps;
}
template<typename T>
bool fptest_close_pct(T val, T expected, T percent)
{
- constexpr T zero = T(0);
- assert(percent >= zero);
+ constexpr T zero = T(0);
+ assert(percent >= zero);
-// Handle the zero cases
- if (percent == zero) return val == expected;
- T eps = (percent / T(100)) * std::max(std::abs(val), std::abs(expected));
+ // Handle the zero cases
+ if (percent == zero) return val == expected;
+ T eps = (percent / T(100)) * std::max(std::abs(val), std::abs(expected));
- return fptest_close(val, expected, eps);
+ return fptest_close(val, expected, eps);
}
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 8039efb6f6a18..b6d556bcb1467 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -185,7 +185,12 @@ check-generated-output)
# Reject patches that introduce non-ASCII characters or hard tabs.
# Depends on LC_COLLATE set at the top of this script.
- ! grep -rn '[^ -~]' libcxx/include/ || false
+ ! grep -rn '[^ -~]' libcxx/include libcxx/src libcxx/test libcxx/benchmarks \
+ --exclude '*.dat' \
+ --exclude 'std_format_spec_string_unicode.bench.cpp' \
+ --exclude 'grep.pass.cpp' \
+ --exclude 'locale-specific_form.pass.cpp' \
+ --exclude 'format_tests.h' || false
# Reject code with trailing whitespace
! grep -rn '[[:blank:]]$' libcxx/include libcxx/src libcxx/test libcxx/benchmarks || false
More information about the libcxx-commits
mailing list