diff --git a/libcxx/benchmarks/algorithms/common.h b/libcxx/benchmarks/algorithms/common.h --- a/libcxx/benchmarks/algorithms/common.h +++ b/libcxx/benchmarks/algorithms/common.h @@ -49,8 +49,8 @@ // 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 void fillAdversarialQuickSortInput(T& V, size_t N) { diff --git a/libcxx/benchmarks/formatter_float.bench.cpp b/libcxx/benchmarks/formatter_float.bench.cpp --- a/libcxx/benchmarks/formatter_float.bench.cpp +++ b/libcxx/benchmarks/formatter_float.bench.cpp @@ -203,7 +203,7 @@ template <> struct Precision { - // 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 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -52,11 +52,11 @@ #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 --- a/libcxx/src/charconv.cpp +++ b/libcxx/src/charconv.cpp @@ -21,13 +21,13 @@ _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 --- a/libcxx/src/ios.cpp +++ b/libcxx/src/ios.cpp @@ -145,11 +145,11 @@ template 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::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::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 --- a/libcxx/src/iostream.cpp +++ b/libcxx/src/iostream.cpp @@ -109,8 +109,8 @@ class DoIOSInit { public: - DoIOSInit(); - ~DoIOSInit(); + DoIOSInit(); + ~DoIOSInit(); }; DoIOSInit::DoIOSInit() diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -4805,7 +4805,7 @@ { // 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 @@ 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 --- a/libcxx/src/optional.cpp +++ b/libcxx/src/optional.cpp @@ -16,7 +16,7 @@ const char* bad_optional_access::what() const noexcept { return "bad_optional_access"; - } +} } // std @@ -28,13 +28,13 @@ _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 --- a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp +++ b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp @@ -19,7 +19,7 @@ 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 --- 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 --- 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 > f; -// expected-error-re@streambuf:* {{{{(static_assert|static assertion)}} failed{{.*}}traits_type::char_type must be the same type as CharT}} + std::basic_filebuf > f; + // expected-error-re@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 --- 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 #include @@ -33,5 +33,5 @@ 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 --- 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 > f; + std::basic_fstream > f; // expected-error-re@ios:* {{{{(static_assert|static assertion)}} failed{{.*}}traits_type::char_type must be the same type as CharT}} // expected-error-re@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 --- 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 > sb; + std::basic_stringbuf > sb; // expected-error-re@streambuf:* {{{{(static_assert|static assertion)}} failed{{.*}}traits_type::char_type must be the same type as CharT}} // expected-error-re@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 --- a/libcxx/test/libcxx/iterators/assert.advance.pass.cpp +++ b/libcxx/test/libcxx/iterators/assert.advance.pass.cpp @@ -24,13 +24,13 @@ int a[] = {1, 2, 3}; bidirectional_iterator 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 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 --- 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 @@ void test() { (void) std::contiguous_iterator; - // 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 --- 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 #include diff --git a/libcxx/test/libcxx/memory/is_allocator.pass.cpp b/libcxx/test/libcxx/memory/is_allocator.pass.cpp --- a/libcxx/test/libcxx/memory/is_allocator.pass.cpp +++ b/libcxx/test/libcxx/memory/is_allocator.pass.cpp @@ -25,19 +25,19 @@ template void test_allocators() { - static_assert(!std::__is_allocator::value, "" ); - static_assert( std::__is_allocator>::value, "" ); - static_assert( std::__is_allocator>::value, "" ); - static_assert( std::__is_allocator>::value, "" ); + static_assert(!std::__is_allocator::value, "" ); + static_assert( std::__is_allocator>::value, "" ); + static_assert( std::__is_allocator>::value, "" ); + static_assert( std::__is_allocator>::value, "" ); } int main(int, char**) { -// test_allocators(); - test_allocators(); - test_allocators(); - test_allocators(); + // test_allocators(); + test_allocators(); + test_allocators(); + test_allocators(); - 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 --- 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 @@ static_assert(HasInplaceMergeIter); -// !bidirectional_­iterator +// !bidirectional_iterator static_assert(!HasInplaceMergeIter); static_assert(!HasInplaceMergeIter>); @@ -287,7 +287,7 @@ // 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 --- 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 @@ // -// template S, class Comp = ranges::less, +// template S, class Comp = ranges::less, // class Proj = identity> // requires sortable // constexpr I // ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {}); // since C++20 // -// template +// template // requires sortable, Comp, Proj> // constexpr borrowed_iterator_t // ranges::nth_element(R&& r, iterator_t 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 --- 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 @@ // 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 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 --- 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 @@ // 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& 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 --- 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 @@ 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 --- 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 @@ 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(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 --- 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 @@ typedef std::list 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(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 --- 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 @@ typedef std::list 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(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 --- 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& arr) noexcept; // // Remarks: These constructors shall not participate in overload resolution unless: -// — extent == dynamic_extent || N == extent is true, and -// — remove_pointer_t(*)[] is convertible to ElementType(*)[]. +// - extent == dynamic_extent || N == extent is true, and +// - remove_pointer_t(*)[] 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 --- 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(*)[] is convertible to ElementType(*)[]. +// - extent == dynamic_extent || N == extent is true, and +// - remove_pointer_t(*)[] 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 --- 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& arr) noexcept; // // Remarks: These constructors shall not participate in overload resolution unless: -// — extent == dynamic_extent || N == extent is true, and -// — remove_pointer_t(*)[] is convertible to ElementType(*)[]. +// - extent == dynamic_extent || N == extent is true, and +// - remove_pointer_t(*)[] 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 --- 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 @@ // // // 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 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 --- 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 @@ // 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 @@ {"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 --- 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 @@ f.put(cpp17_output_iterator(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 --- 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 #include @@ -28,25 +28,25 @@ template constexpr bool toobig() { - return 0 == std::bit_ceil(std::numeric_limits::max()); + return 0 == std::bit_ceil(std::numeric_limits::max()); } int main(int, char**) { -// Make sure we generate a compile-time error for UB - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} - static_assert(toobig(), ""); // 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(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}} + static_assert(toobig(), ""); // 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 --- 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 @@ // 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 @@ // 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.difference/adjacent_difference_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp --- a/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp @@ -70,7 +70,7 @@ // 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 @@ // 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 --- 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 @@ // 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 @@ // 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 --- 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 @@ #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 --- 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 @@ // 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 @@ // 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 --- 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 && +// requires input_range && // is_reference_v>; #include @@ -119,7 +119,7 @@ static_assert(HasConstBegin); } - // !input_­range + // !input_range { std::ranges::join_view jv{ConstNotRange{}}; static_assert(!HasConstBegin); 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 --- 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 i) // requires Const && -// convertible_­to, OuterIter> && -// convertible_­to, InnerIter>; +// convertible_to, OuterIter> && +// convertible_to, InnerIter>; #include #include 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 --- 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 && -// bidirectional_­range> && -// common_­range>; +// requires ref-is-glvalue && bidirectional_range && +// bidirectional_range> && +// common_range>; // constexpr iterator operator--(int); -// requires ref-is-glvalue && bidirectional_­range && -// bidirectional_­range> && -// common_­range>; +// requires ref-is-glvalue && bidirectional_range && +// bidirectional_range> && +// common_range>; #include #include @@ -124,7 +124,7 @@ } { - // !bidirectional_­range + // !bidirectional_range BidiCommonInner inners[2] = {buffer[0], buffer[1]}; SimpleForwardCommonOuter outer{inners}; std::ranges::join_view jv(outer); @@ -132,7 +132,7 @@ } { - // !bidirectional_­range> + // !bidirectional_range> ForwardCommonInner inners[2] = {buffer[0], buffer[1]}; std::ranges::join_view jv(inners); noDecrementTest(jv); @@ -141,7 +141,7 @@ { // LWG3313 `join_view::iterator::operator--` is incorrectly constrained // `join_view::iterator` should not have `operator--` if - // !common_­range> + // !common_range> 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 --- 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 && +// requires ref-is-glvalue && forward_range && // forward_range>; #include @@ -186,7 +186,7 @@ } { - // !forward_­range + // !forward_range BufferView inners[2] = {buffer1[0], buffer1[1]}; using Outer = SimpleInputCommonOuter>; 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 --- 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 s); -// requires Const && convertible_­to, sentinel_t>; +// requires Const && convertible_to, sentinel_t>; #include #include 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 --- 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;`, // except `operator-(x, y)` which instead has the constraint -// `requires (sized_­sentinel_­for>, +// `requires (sized_sentinel_for>, // iterator_t>> && ...);` #include 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 --- 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>> && ...); +// requires (equality_comparable>> && ...); // friend constexpr bool operator<(const iterator& x, const iterator& y) // requires all-random-access; // friend constexpr bool operator>(const iterator& x, const iterator& y) @@ -20,7 +20,7 @@ // requires all-random-access; // friend constexpr auto operator<=>(const iterator& x, const iterator& y) // requires all-random-access && -// (three_­way_­comparable>> && ...); +// (three_way_comparable>> && ...); #include #include 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 --- 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 i) -// requires Const && (convertible_­to, +// requires Const && (convertible_to, // iterator_t>> && ...); #include 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 --- 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>> && ...); +// requires (indirectly_swappable>> && ...); #include #include 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 --- 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>, // iterator_t>>&&...) // friend constexpr common_type_t>...> -// operator-(const iterator&, const sentinel&) +// operator-(const iterator&, const sentinel&) // // template // requires(sized_sentinel_for>, 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 --- 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 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// template ::value_type>> -// vector(InputIterator, InputIterator, Allocator = Allocator()) -// -> vector::value_type, Allocator>; -// +// template +// basic_regex(ForwardIterator, ForwardIterator, +// regex_constants::syntax_option_type = regex_constants::ECMAScript) +// -> basic_regex::value_type>; #include #include @@ -23,21 +23,18 @@ int main(int, char**) { -// Test the explicit deduction guides + // Test the explicit deduction guides { -// basic_regex(ForwardIterator, ForwardIterator) -// is not an iterator + // basic_regex(ForwardIterator, ForwardIterator) + // 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) -// is not an iterator + // basic_regex(ForwardIterator, ForwardIterator, flag_type) + // 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.hms/time.hms.members/is_negative.pass.cpp b/libcxx/test/std/time/time.hms/time.hms.members/is_negative.pass.cpp --- 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 constexpr bool check_neg(Duration d) { - ASSERT_SAME_TYPE(bool, decltype(std::declval>().is_negative())); - ASSERT_NOEXCEPT( std::declval>().is_negative()); - return std::chrono::hh_mm_ss(d).is_negative(); + ASSERT_SAME_TYPE(bool, decltype(std::declval>().is_negative())); + ASSERT_NOEXCEPT( std::declval>().is_negative()); + return std::chrono::hh_mm_ss(d).is_negative(); } int main(int, char**) { - using microfortnights = std::chrono::duration>; + using microfortnights = std::chrono::duration>; - 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 --- 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 constexpr bool check_precision() { - using HMS = std::chrono::hh_mm_ss; - using CT = std::common_type_t; - using Pre = std::chrono::duration>; - return std::is_same_v; + using HMS = std::chrono::hh_mm_ss; + using CT = std::common_type_t; + using Pre = std::chrono::duration>; + return std::is_same_v; } int main(int, char**) { - using microfortnights = std::chrono::duration>; + using microfortnights = std::chrono::duration>; - static_assert( check_precision(), ""); - static_assert( check_precision(), ""); - static_assert( check_precision(), ""); - static_assert( check_precision(), ""); - static_assert( check_precision(), ""); - static_assert( check_precision(), ""); - static_assert( check_precision>, 1>(), ""); - static_assert( check_precision>, 6>(), ""); - static_assert( check_precision>, 2>(), ""); - static_assert( check_precision>, 1>(), ""); - static_assert( check_precision>, 6>(), ""); - static_assert( check_precision>, 6>(), ""); - static_assert( check_precision>, 3>(), ""); - static_assert( check_precision>, 6>(), ""); - static_assert( check_precision>, 1>(), ""); - static_assert( check_precision(), ""); + static_assert( check_precision(), ""); + static_assert( check_precision(), ""); + static_assert( check_precision(), ""); + static_assert( check_precision(), ""); + static_assert( check_precision(), ""); + static_assert( check_precision(), ""); + static_assert( check_precision>, 1>(), ""); + static_assert( check_precision>, 6>(), ""); + static_assert( check_precision>, 2>(), ""); + static_assert( check_precision>, 1>(), ""); + static_assert( check_precision>, 6>(), ""); + static_assert( check_precision>, 6>(), ""); + static_assert( check_precision>, 3>(), ""); + static_assert( check_precision>, 6>(), ""); + static_assert( check_precision>, 1>(), ""); + static_assert( check_precision(), ""); - 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 --- 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 constexpr bool check_width() { - using HMS = std::chrono::hh_mm_ss; - return HMS::fractional_width == width; + using HMS = std::chrono::hh_mm_ss; + return HMS::fractional_width == width; } int main(int, char**) { - using microfortnights = std::chrono::duration>; - - static_assert( check_width(), ""); - static_assert( check_width(), ""); - static_assert( check_width(), ""); - static_assert( check_width(), ""); - static_assert( check_width(), ""); - static_assert( check_width(), ""); - static_assert( check_width>, 1>(), ""); - static_assert( check_width>, 6>(), ""); - static_assert( check_width>, 2>(), ""); - static_assert( check_width>, 1>(), ""); - static_assert( check_width>, 6>(), ""); - static_assert( check_width>, 6>(), ""); - static_assert( check_width>, 3>(), ""); - static_assert( check_width>, 6>(), ""); - static_assert( check_width>, 1>(), ""); - static_assert( check_width(), ""); - - return 0; + using microfortnights = std::chrono::duration>; + + static_assert( check_width(), ""); + static_assert( check_width(), ""); + static_assert( check_width(), ""); + static_assert( check_width(), ""); + static_assert( check_width(), ""); + static_assert( check_width(), ""); + static_assert( check_width>, 1>(), ""); + static_assert( check_width>, 6>(), ""); + static_assert( check_width>, 2>(), ""); + static_assert( check_width>, 1>(), ""); + static_assert( check_width>, 6>(), ""); + static_assert( check_width>, 6>(), ""); + static_assert( check_width>, 3>(), ""); + static_assert( check_width>, 6>(), ""); + static_assert( check_width>, 1>(), ""); + static_assert( check_width(), ""); + + return 0; } 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 --- 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()))); - ASSERT_NOEXCEPT( std::chrono::is_am(std::declval())); + using hours = std::chrono::hours; + ASSERT_SAME_TYPE(bool, decltype(std::chrono::is_am(std::declval()))); + ASSERT_NOEXCEPT( std::chrono::is_am(std::declval())); - 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.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 --- 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 #include 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 --- 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 --- 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 #include #include 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 --- 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 --- 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 #include 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 --- 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 #include #include 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 --- 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 #include #include 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 --- 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 #include #include 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 --- 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 #include #include 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 --- 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 #include #include 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 --- 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 #include 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 --- 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 #include 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 --- 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 #include 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 --- 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 #include 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 --- 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 #include 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 --- 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 #include 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 --- 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 #include 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 --- 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 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 --- 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 diff --git a/libcxx/test/std/utilities/format/format.functions/format.verify.cpp b/libcxx/test/std/utilities/format/format.functions/format.verify.cpp --- 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 @@ 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 --- 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 @@ assert(globalMemCounter.checkOutstandingNewEq(1)); RTTI_ASSERT(f.target()); RTTI_ASSERT(f.target() == 0); - LIBCPP_ASSERT_NOEXCEPT(std::function(std::move(f))); + LIBCPP_ASSERT_NOEXCEPT(std::function(std::move(f))); #if TEST_STD_VER > 17 - ASSERT_NOEXCEPT(std::function(std::move(f))); + ASSERT_NOEXCEPT(std::function(std::move(f))); #endif std::function f2 = std::move(f); assert(A::count == 1); @@ -140,9 +140,9 @@ assert(A::count == 1); RTTI_ASSERT(f.target() == nullptr); RTTI_ASSERT(f.target()); - LIBCPP_ASSERT_NOEXCEPT(std::function(std::move(f))); + LIBCPP_ASSERT_NOEXCEPT(std::function(std::move(f))); #if TEST_STD_VER > 17 - ASSERT_NOEXCEPT(std::function(std::move(f))); + ASSERT_NOEXCEPT(std::function(std::move(f))); #endif std::function f2(std::move(f)); assert(A::count == 1); @@ -161,9 +161,9 @@ std::function f(p); RTTI_ASSERT(f.target() == nullptr); RTTI_ASSERT(f.target()); - LIBCPP_ASSERT_NOEXCEPT(std::function(std::move(f))); + LIBCPP_ASSERT_NOEXCEPT(std::function(std::move(f))); #if TEST_STD_VER > 17 - ASSERT_NOEXCEPT(std::function(std::move(f))); + ASSERT_NOEXCEPT(std::function(std::move(f))); #endif std::function f2(std::move(f)); RTTI_ASSERT(f2.target() == 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 --- 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 void test_array_imp() { - static_assert( B == std::is_bounded_array::value, "" ); - static_assert( B == std::is_bounded_array_v, "" ); + static_assert( B == std::is_bounded_array::value, "" ); + static_assert( B == std::is_bounded_array_v, "" ); } template @@ -47,21 +47,21 @@ int main(int, char**) { -// Non-array types - test_array(); - test_array(); - test_array(); - test_array(); - test_array(); - test_array(); - test_array(); + // Non-array types + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); + test_array(); test_array(); test_array(); test_array(); test_array(); test_array(); -// Array types + // Array types test_array(); test_array(); test_array(); 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 --- 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 @@ int main(int, char**) { - { - std::optional o1; // expected-error-re@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with a reference type is ill-formed}} - std::optional o2; // expected-error-re@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with a non-destructible type is ill-formed}} - std::optional o3; // expected-error-re@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@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}} - std::optional o2; // expected-error-re@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@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}} - std::optional o4; // expected-error-re@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@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}} - std::optional o2; // expected-error-re@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@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}} - std::optional o4; // expected-error-re@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}} - } - - return 0; + { + std::optional o1; // expected-error-re@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with a reference type is ill-formed}} + std::optional o2; // expected-error-re@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with a non-destructible type is ill-formed}} + std::optional o3; // expected-error-re@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@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}} + std::optional o2; // expected-error-re@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@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with in_place_t is ill-formed}} + std::optional o4; // expected-error-re@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@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}} + std::optional o2; // expected-error-re@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@optional:* {{{{(static_assert|static assertion)}} failed{{.*}}instantiation of optional with nullopt_t is ill-formed}} + std::optional o4; // expected-error-re@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 --- 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 // bool operator>=(nullptr_t, const unique_ptr& y); // template -// requires three_­way_­comparable::pointer> +// requires three_way_comparable::pointer> // constexpr compare_three_way_result_t::pointer> // operator<=>(const unique_ptr& 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 --- 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(FWD(u)))> && ...) is true && // ( -// sizeof...(Types) is not 1 || -// ( -// !is_convertible_v && -// !is_constructible_v && -// !is_same_v -// ) +// sizeof...(Types) is not 1 || +// ( +// !is_convertible_v && +// !is_constructible_v && +// !is_same_v +// ) // ) // 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 --- 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(FWD(u)))> && ...) is true && // ( -// sizeof...(Types) is not 1 || -// ( -// !is_convertible_v && -// !is_constructible_v && -// !is_same_v -// ) +// sizeof...(Types) is not 1 || +// ( +// !is_convertible_v && +// !is_constructible_v && +// !is_same_v +// ) // ) // 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 --- 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 // template // constexpr explicit(see below) -// tuple::tuple(allocator_arg_t, const Alloc& a, pair& -// u); +// tuple::tuple(allocator_arg_t, const Alloc& a, pair& 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 --- 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(FWD(u)))> && ...) is true && // ( -// sizeof...(Types) is not 1 || -// ( -// !is_convertible_v && -// !is_constructible_v && -// !is_same_v -// ) +// sizeof...(Types) is not 1 || +// ( +// !is_convertible_v && +// !is_constructible_v && +// !is_same_v +// ) // ) // 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 --- 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(FWD(u)))> && ...) is true && // ( -// sizeof...(Types) is not 1 || -// ( -// !is_convertible_v && -// !is_constructible_v && -// !is_same_v -// ) +// sizeof...(Types) is not 1 || +// ( +// !is_convertible_v && +// !is_constructible_v && +// !is_same_v +// ) // ) // 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 --- a/libcxx/test/support/filesystem_test_helper.h +++ b/libcxx/test/support/filesystem_test_helper.h @@ -328,20 +328,20 @@ /// 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 --- a/libcxx/test/support/fp_compare.h +++ b/libcxx/test/support/fp_compare.h @@ -17,29 +17,29 @@ template 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 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 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -185,7 +185,12 @@ # 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