aboutsummaryrefslogtreecommitdiff
path: root/libcxx
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/regex2
-rw-r--r--libcxx/include/span7
2 files changed, 5 insertions, 4 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex
index 850fe099df1e..26887e84bf28 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -1355,7 +1355,7 @@ inline _LIBCPP_INLINE_VISIBILITY
unsigned char __to_lower(unsigned char __c)
{
#if defined(__MVS__) && !defined(__NATIVE_ASCII_F)
- return c & 0xBF;
+ return __c & 0xBF;
#else
return __c | 0x20;
#endif
diff --git a/libcxx/include/span b/libcxx/include/span
index 00793a210cbe..67d2ac241ff2 100644
--- a/libcxx/include/span
+++ b/libcxx/include/span
@@ -453,9 +453,10 @@ public:
: __data{_VSTD::to_address(__first)}, __size{__count} {}
template <__span_compatible_iterator<element_type> _It, __span_compatible_sentinel_for<_It> _End>
- _LIBCPP_INLINE_VISIBILITY
- constexpr span(_It __first, _End __last)
- : __data(_VSTD::to_address(__first)), __size(__last - __first) {}
+ _LIBCPP_INLINE_VISIBILITY constexpr span(_It __first, _End __last)
+ : __data(_VSTD::to_address(__first)), __size(__last - __first) {
+ _LIBCPP_ASSERT(__last - __first >= 0, "invalid range in span's constructor (iterator, sentinel)");
+ }
template <size_t _Sz>
_LIBCPP_INLINE_VISIBILITY