Eradicate all the ptrdiff_ts in span left over from applying P1227. A couple of other minor cleanups. NFC

llvm-svn: 355481
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 f559b1f..c303719 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 @@
 
 // <span>
 
-// template<class OtherElementType, ptrdiff_t OtherExtent>
+// template<class OtherElementType, size_t OtherExtent>
 //    constexpr span(const span<OtherElementType, OtherExtent>& 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 74da3fc..62f8b9d 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 @@
 
 // <span>
 
-// template<class OtherElementType, ptrdiff_t OtherExtent>
+// template<class OtherElementType, size_t OtherExtent>
 //    constexpr span(const span<OtherElementType, OtherExtent>& 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 cb63ec9..893331a 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 <typename Span>
-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 @@
 
 
 template <typename Span>
-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 12772c4..ff1038e 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 @@
 
 // <span>
 
-// template <class ElementType, ptrdiff_t Extent>
+// template <class ElementType, size_t Extent>
 //     span<const byte,
 //          Extent == dynamic_extent
 //              ? dynamic_extent
-//              : static_cast<ptrdiff_t>(sizeof(ElementType)) * Extent>
+//              : sizeof(ElementType) * Extent>
 //     as_bytes(span<ElementType, Extent> s) noexcept;
 
 
@@ -36,7 +36,7 @@
     if (sp.extent == std::dynamic_extent)
         assert(spBytes.extent == std::dynamic_extent);
     else
-        assert(spBytes.extent == static_cast<std::ptrdiff_t>(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 9dadedd..388da08 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 @@
 
 // <span>
 
-// template <class ElementType, ptrdiff_t Extent>
+// template <class ElementType, size_t Extent>
 //     span<byte,
 //          Extent == dynamic_extent
 //              ? dynamic_extent
-//              : static_cast<ptrdiff_t>(sizeof(ElementType)) * Extent>
+//              : sizeof(ElementType) * Extent>
 //     as_writeable_bytes(span<ElementType, Extent> 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 b12500d..409f6fa 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 @@
 
 // <span>
 
-// template <class ElementType, ptrdiff_t Extent>
+// template <class ElementType, size_t Extent>
 //     span<byte,
 //          Extent == dynamic_extent
 //              ? dynamic_extent
-//              : static_cast<ptrdiff_t>(sizeof(ElementType)) * Extent>
+//              : sizeof(ElementType) * Extent>
 //     as_writeable_bytes(span<ElementType, Extent> s) noexcept;
 
 
@@ -36,7 +36,7 @@
     if (sp.extent == std::dynamic_extent)
         assert(spBytes.extent == std::dynamic_extent);
     else
-        assert(spBytes.extent == static_cast<std::ptrdiff_t>(sizeof(typename Span::element_type)) * sp.extent);
+        assert(spBytes.extent == sizeof(typename Span::element_type) * sp.extent);
 
     assert(static_cast<void*>(spBytes.data()) == static_cast<void*>(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 447829d..2579566 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 <typename Span>
-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 @@
 
 
 template <typename Span>
-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 f9da9fd..30ab130 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 @@
 
 // <span>
 
-// template<ptrdiff_t Count>
+// template<size_t Count>
 //  constexpr span<element_type, Count> first() const;
 //
 // constexpr span<element_type, dynamic_extent> first(index_type count) const;
@@ -25,7 +25,7 @@
 
 #include "test_macros.h"
 
-template <typename Span, ptrdiff_t Count>
+template <typename Span, size_t Count>
 constexpr bool testConstexprSpan(Span sp)
 {
     LIBCPP_ASSERT((noexcept(sp.template first<Count>())));
@@ -45,7 +45,7 @@
 }
 
 
-template <typename Span, ptrdiff_t Count>
+template <typename Span, size_t Count>
 void testRuntimeSpan(Span sp)
 {
     LIBCPP_ASSERT((noexcept(sp.template first<Count>())));
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 e0a399f..2864a7f 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 @@
 
 // <span>
 
-// template<ptrdiff_t Count>
+// template<size_t Count>
 //  constexpr span<element_type, Count> last() const;
 //
 // constexpr span<element_type, dynamic_extent> last(index_type count) const;
@@ -25,7 +25,7 @@
 
 #include "test_macros.h"
 
-template <typename Span, ptrdiff_t Count>
+template <typename Span, size_t Count>
 constexpr bool testConstexprSpan(Span sp)
 {
     LIBCPP_ASSERT((noexcept(sp.template last<Count>())));
@@ -45,7 +45,7 @@
 }
 
 
-template <typename Span, ptrdiff_t Count>
+template <typename Span, size_t Count>
 void testRuntimeSpan(Span sp)
 {
     LIBCPP_ASSERT((noexcept(sp.template last<Count>())));
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 9cb7310..f2dbe84 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 @@
 
 // <span>
 
-// template<ptrdiff_t Offset, ptrdiff_t Count = dynamic_extent>
+// template<size_t Offset, size_t Count = dynamic_extent>
 //   constexpr span<element_type, see below> subspan() const;
 //
 // constexpr span<element_type, dynamic_extent> subspan(
@@ -26,7 +26,7 @@
 
 #include "test_macros.h"
 
-template <typename Span, ptrdiff_t Offset, ptrdiff_t Count>
+template <typename Span, size_t Offset, size_t Count>
 constexpr bool testConstexprSpan(Span sp)
 {
     LIBCPP_ASSERT((noexcept(sp.template subspan<Offset, Count>())));
@@ -45,7 +45,7 @@
      && std::equal(s1.begin(), s1.end(), sp.begin() + Offset);
 }
 
-template <typename Span, ptrdiff_t Offset>
+template <typename Span, size_t Offset>
 constexpr bool testConstexprSpan(Span sp)
 {
     LIBCPP_ASSERT((noexcept(sp.template subspan<Offset>())));
@@ -65,7 +65,7 @@
 }
 
 
-template <typename Span, ptrdiff_t Offset, ptrdiff_t Count>
+template <typename Span, size_t Offset, size_t Count>
 void testRuntimeSpan(Span sp)
 {
     LIBCPP_ASSERT((noexcept(sp.template subspan<Offset, Count>())));
@@ -84,7 +84,7 @@
 }
 
 
-template <typename Span, ptrdiff_t Offset>
+template <typename Span, size_t Offset>
 void testRuntimeSpan(Span sp)
 {
     LIBCPP_ASSERT((noexcept(sp.template subspan<Offset>())));
diff --git a/libcxx/test/std/containers/views/types.pass.cpp b/libcxx/test/std/containers/views/types.pass.cpp
index 60c365b..787cfdd 100644
--- a/libcxx/test/std/containers/views/types.pass.cpp
+++ b/libcxx/test/std/containers/views/types.pass.cpp
@@ -10,7 +10,7 @@
 
 // <span>
 
-// template<class ElementType, ptrdiff_t Extent = dynamic_extent>
+// template<class ElementType, size_t Extent = dynamic_extent>
 // class span {
 // public:
 //  // constants and types