From 8eda3ad29d89317aa25cf2e7aaf8c785b32fc608 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Wed, 6 Mar 2019 03:59:44 +0000 Subject: Eradicate all the ptrdiff_ts in span left over from applying P1227. A couple of other minor cleanups. NFC llvm-svn: 355481 --- libcxx/test/std/containers/views/span.cons/span.fail.cpp | 2 +- libcxx/test/std/containers/views/span.cons/span.pass.cpp | 2 +- libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp | 4 ++-- .../test/std/containers/views/span.objectrep/as_bytes.pass.cpp | 6 +++--- .../views/span.objectrep/as_writeable_bytes.fail.cpp | 4 ++-- .../views/span.objectrep/as_writeable_bytes.pass.cpp | 6 +++--- libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp | 4 ++-- libcxx/test/std/containers/views/span.sub/first.pass.cpp | 6 +++--- libcxx/test/std/containers/views/span.sub/last.pass.cpp | 6 +++--- libcxx/test/std/containers/views/span.sub/subspan.pass.cpp | 10 +++++----- libcxx/test/std/containers/views/types.pass.cpp | 2 +- 11 files changed, 26 insertions(+), 26 deletions(-) (limited to 'libcxx/test/std/containers') diff --git a/libcxx/test/std/containers/views/span.cons/span.fail.cpp b/libcxx/test/std/containers/views/span.cons/span.fail.cpp index f559b1fb0c2..c303719fd01 100644 --- a/libcxx/test/std/containers/views/span.cons/span.fail.cpp +++ b/libcxx/test/std/containers/views/span.cons/span.fail.cpp @@ -10,7 +10,7 @@ // -// template +// template // constexpr span(const span& s) noexcept; // // Remarks: This constructor shall not participate in overload resolution unless: diff --git a/libcxx/test/std/containers/views/span.cons/span.pass.cpp b/libcxx/test/std/containers/views/span.cons/span.pass.cpp index 74da3fce894..62f8b9da11b 100644 --- a/libcxx/test/std/containers/views/span.cons/span.pass.cpp +++ b/libcxx/test/std/containers/views/span.cons/span.pass.cpp @@ -10,7 +10,7 @@ // -// template +// template // constexpr span(const span& s) noexcept; // // Remarks: This constructor shall not participate in overload resolution unless: diff --git a/libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp b/libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp index cb63ec9d17b..893331ad8f1 100644 --- a/libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp +++ b/libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp @@ -23,7 +23,7 @@ template -constexpr bool testConstexprSpan(Span sp, ptrdiff_t idx) +constexpr bool testConstexprSpan(Span sp, size_t idx) { _LIBCPP_ASSERT(noexcept(sp[idx]), ""); @@ -34,7 +34,7 @@ constexpr bool testConstexprSpan(Span sp, ptrdiff_t idx) template -void testRuntimeSpan(Span sp, ptrdiff_t idx) +void testRuntimeSpan(Span sp, size_t idx) { _LIBCPP_ASSERT(noexcept(sp[idx]), ""); diff --git a/libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp b/libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp index 12772c42f16..ff1038e0b11 100644 --- a/libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp +++ b/libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp @@ -10,11 +10,11 @@ // -// template +// template // span(sizeof(ElementType)) * Extent> +// : sizeof(ElementType) * Extent> // as_bytes(span s) noexcept; @@ -36,7 +36,7 @@ void testRuntimeSpan(Span sp) if (sp.extent == std::dynamic_extent) assert(spBytes.extent == std::dynamic_extent); else - assert(spBytes.extent == static_cast(sizeof(typename Span::element_type)) * sp.extent); + assert(spBytes.extent == sizeof(typename Span::element_type) * sp.extent); assert((void *) spBytes.data() == (void *) sp.data()); assert(spBytes.size() == sp.size_bytes()); diff --git a/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.fail.cpp b/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.fail.cpp index 9dadedd7523..388da084ae0 100644 --- a/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.fail.cpp +++ b/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.fail.cpp @@ -10,11 +10,11 @@ // -// template +// template // span(sizeof(ElementType)) * Extent> +// : sizeof(ElementType) * Extent> // as_writeable_bytes(span s) noexcept; diff --git a/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.pass.cpp b/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.pass.cpp index b12500d4ffb..409f6fa7cd6 100644 --- a/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.pass.cpp +++ b/libcxx/test/std/containers/views/span.objectrep/as_writeable_bytes.pass.cpp @@ -10,11 +10,11 @@ // -// template +// template // span(sizeof(ElementType)) * Extent> +// : sizeof(ElementType) * Extent> // as_writeable_bytes(span s) noexcept; @@ -36,7 +36,7 @@ void testRuntimeSpan(Span sp) if (sp.extent == std::dynamic_extent) assert(spBytes.extent == std::dynamic_extent); else - assert(spBytes.extent == static_cast(sizeof(typename Span::element_type)) * sp.extent); + assert(spBytes.extent == sizeof(typename Span::element_type) * sp.extent); assert(static_cast(spBytes.data()) == static_cast(sp.data())); assert(spBytes.size() == sp.size_bytes()); diff --git a/libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp b/libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp index 447829d516e..257956684ea 100644 --- a/libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp +++ b/libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp @@ -23,7 +23,7 @@ template -constexpr bool testConstexprSpan(Span sp, ptrdiff_t sz) +constexpr bool testConstexprSpan(Span sp, size_t sz) { ASSERT_NOEXCEPT(sp.size_bytes()); return (size_t) sp.size_bytes() == sz * sizeof(typename Span::element_type); @@ -31,7 +31,7 @@ constexpr bool testConstexprSpan(Span sp, ptrdiff_t sz) template -void testRuntimeSpan(Span sp, ptrdiff_t sz) +void testRuntimeSpan(Span sp, size_t sz) { ASSERT_NOEXCEPT(sp.size_bytes()); assert((size_t) sp.size_bytes() == sz * sizeof(typename Span::element_type)); diff --git a/libcxx/test/std/containers/views/span.sub/first.pass.cpp b/libcxx/test/std/containers/views/span.sub/first.pass.cpp index f9da9fdc233..30ab130381c 100644 --- a/libcxx/test/std/containers/views/span.sub/first.pass.cpp +++ b/libcxx/test/std/containers/views/span.sub/first.pass.cpp @@ -10,7 +10,7 @@ // -// template +// template // constexpr span first() const; // // constexpr span first(index_type count) const; @@ -25,7 +25,7 @@ #include "test_macros.h" -template +template constexpr bool testConstexprSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template first()))); @@ -45,7 +45,7 @@ constexpr bool testConstexprSpan(Span sp) } -template +template void testRuntimeSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template first()))); diff --git a/libcxx/test/std/containers/views/span.sub/last.pass.cpp b/libcxx/test/std/containers/views/span.sub/last.pass.cpp index e0a399ff9cd..2864a7f65e5 100644 --- a/libcxx/test/std/containers/views/span.sub/last.pass.cpp +++ b/libcxx/test/std/containers/views/span.sub/last.pass.cpp @@ -10,7 +10,7 @@ // -// template +// template // constexpr span last() const; // // constexpr span last(index_type count) const; @@ -25,7 +25,7 @@ #include "test_macros.h" -template +template constexpr bool testConstexprSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template last()))); @@ -45,7 +45,7 @@ constexpr bool testConstexprSpan(Span sp) } -template +template void testRuntimeSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template last()))); diff --git a/libcxx/test/std/containers/views/span.sub/subspan.pass.cpp b/libcxx/test/std/containers/views/span.sub/subspan.pass.cpp index 9cb73109347..f2dbe8408dd 100644 --- a/libcxx/test/std/containers/views/span.sub/subspan.pass.cpp +++ b/libcxx/test/std/containers/views/span.sub/subspan.pass.cpp @@ -10,7 +10,7 @@ // -// template +// template // constexpr span subspan() const; // // constexpr span subspan( @@ -26,7 +26,7 @@ #include "test_macros.h" -template +template constexpr bool testConstexprSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template subspan()))); @@ -45,7 +45,7 @@ constexpr bool testConstexprSpan(Span sp) && std::equal(s1.begin(), s1.end(), sp.begin() + Offset); } -template +template constexpr bool testConstexprSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template subspan()))); @@ -65,7 +65,7 @@ constexpr bool testConstexprSpan(Span sp) } -template +template void testRuntimeSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template subspan()))); @@ -84,7 +84,7 @@ void testRuntimeSpan(Span sp) } -template +template void testRuntimeSpan(Span sp) { LIBCPP_ASSERT((noexcept(sp.template subspan()))); diff --git a/libcxx/test/std/containers/views/types.pass.cpp b/libcxx/test/std/containers/views/types.pass.cpp index 60c365b8938..787cfdd4e0c 100644 --- a/libcxx/test/std/containers/views/types.pass.cpp +++ b/libcxx/test/std/containers/views/types.pass.cpp @@ -10,7 +10,7 @@ // -// template +// template // class span { // public: // // constants and types -- cgit v1.2.3