diff --git a/libcxx/.clang-tidy b/libcxx/.clang-tidy --- a/libcxx/.clang-tidy +++ b/libcxx/.clang-tidy @@ -17,6 +17,7 @@ modernize-redundant-void-arg, readability-duplicate-include, + readability-identifier-naming, readability-function-cognitive-complexity, readability-function-size, readability-misplaced-array-index, @@ -31,6 +32,12 @@ value: 143 # TODO: bring that number down - key: readability-function-size.LineThreshold value: 194 # TODO: bring that number down + - key: readability-identifier-naming.GetConfigPerFile + value: false + - key: readability-identifier-naming.ParameterCase + value: lower_case + - key: readability-identifier-naming.ParameterPrefix + value: __ # TODO: investigate these checks # bugprone-branch-clone, diff --git a/libcxx/include/__algorithm/binary_search.h b/libcxx/include/__algorithm/binary_search.h --- a/libcxx/include/__algorithm/binary_search.h +++ b/libcxx/include/__algorithm/binary_search.h @@ -25,20 +25,20 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool -binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) +binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) { using _Comp_ref = typename __comp_ref_type<_Compare>::type; - __first = std::lower_bound<_ForwardIterator, _Tp, _Comp_ref>(__first, __last, __value_, __comp); - return __first != __last && !__comp(__value_, *__first); + __first = std::lower_bound<_ForwardIterator, _Tp, _Comp_ref>(__first, __last, __value, __comp); + return __first != __last && !__comp(__value, *__first); } template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool -binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) +binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { - return std::binary_search(__first, __last, __value_, + return std::binary_search(__first, __last, __value, __less::value_type, _Tp>()); } diff --git a/libcxx/include/__algorithm/count.h b/libcxx/include/__algorithm/count.h --- a/libcxx/include/__algorithm/count.h +++ b/libcxx/include/__algorithm/count.h @@ -22,10 +22,10 @@ template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 typename iterator_traits<_InputIterator>::difference_type - count(_InputIterator __first, _InputIterator __last, const _Tp& __value_) { + count(_InputIterator __first, _InputIterator __last, const _Tp& __value) { typename iterator_traits<_InputIterator>::difference_type __r(0); for (; __first != __last; ++__first) - if (*__first == __value_) + if (*__first == __value) ++__r; return __r; } diff --git a/libcxx/include/__algorithm/equal_range.h b/libcxx/include/__algorithm/equal_range.h --- a/libcxx/include/__algorithm/equal_range.h +++ b/libcxx/include/__algorithm/equal_range.h @@ -30,7 +30,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator> -__equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) +__equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type; difference_type __len = _VSTD::distance(__first, __last); @@ -39,12 +39,12 @@ difference_type __l2 = _VSTD::__half_positive(__len); _ForwardIterator __m = __first; _VSTD::advance(__m, __l2); - if (__comp(*__m, __value_)) + if (__comp(*__m, __value)) { __first = ++__m; __len -= __l2 + 1; } - else if (__comp(__value_, *__m)) + else if (__comp(__value, *__m)) { __last = __m; __len = __l2; @@ -55,8 +55,8 @@ _ForwardIterator __mp1 = __m; return pair<_ForwardIterator, _ForwardIterator> ( - _VSTD::__lower_bound_impl<_StdIterOps>(__first, __m, __value_, __comp, __proj), - _VSTD::__upper_bound<_Compare>(++__mp1, __last, __value_, __comp) + _VSTD::__lower_bound_impl<_StdIterOps>(__first, __m, __value, __comp, __proj), + _VSTD::__upper_bound<_Compare>(++__mp1, __last, __value, __comp) ); } } @@ -67,19 +67,19 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator> -equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) +equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__equal_range<_Comp_ref>(__first, __last, __value_, __comp); + return _VSTD::__equal_range<_Comp_ref>(__first, __last, __value, __comp); } template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator> -equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) +equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { - return _VSTD::equal_range(__first, __last, __value_, + return _VSTD::equal_range(__first, __last, __value, __less::value_type, _Tp>()); } diff --git a/libcxx/include/__algorithm/fill.h b/libcxx/include/__algorithm/fill.h --- a/libcxx/include/__algorithm/fill.h +++ b/libcxx/include/__algorithm/fill.h @@ -23,26 +23,26 @@ template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void -__fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, forward_iterator_tag) +__fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, forward_iterator_tag) { for (; __first != __last; ++__first) - *__first = __value_; + *__first = __value; } template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void -__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value_, random_access_iterator_tag) +__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag) { - _VSTD::fill_n(__first, __last - __first, __value_); + _VSTD::fill_n(__first, __last - __first, __value); } template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void -fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) +fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { - _VSTD::__fill(__first, __last, __value_, typename iterator_traits<_ForwardIterator>::iterator_category()); + _VSTD::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/fill_n.h b/libcxx/include/__algorithm/fill_n.h --- a/libcxx/include/__algorithm/fill_n.h +++ b/libcxx/include/__algorithm/fill_n.h @@ -22,19 +22,19 @@ template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator -__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value_) +__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) { for (; __n > 0; ++__first, (void) --__n) - *__first = __value_; + *__first = __value; return __first; } template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator -fill_n(_OutputIterator __first, _Size __n, const _Tp& __value_) +fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) { - return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value_); + return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/find.h b/libcxx/include/__algorithm/find.h --- a/libcxx/include/__algorithm/find.h +++ b/libcxx/include/__algorithm/find.h @@ -20,9 +20,9 @@ template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator -find(_InputIterator __first, _InputIterator __last, const _Tp& __value_) { +find(_InputIterator __first, _InputIterator __last, const _Tp& __value) { for (; __first != __last; ++__first) - if (*__first == __value_) + if (*__first == __value) break; return __first; } diff --git a/libcxx/include/__algorithm/lower_bound.h b/libcxx/include/__algorithm/lower_bound.h --- a/libcxx/include/__algorithm/lower_bound.h +++ b/libcxx/include/__algorithm/lower_bound.h @@ -48,17 +48,17 @@ template _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 -_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) { +_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) { static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value, "The comparator has to be callable"); auto __proj = std::__identity(); - return std::__lower_bound_impl<_StdIterOps>(__first, __last, __value_, __comp, __proj); + return std::__lower_bound_impl<_StdIterOps>(__first, __last, __value, __comp, __proj); } template _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 -_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) { - return std::lower_bound(__first, __last, __value_, +_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { + return std::lower_bound(__first, __last, __value, __less::value_type, _Tp>()); } diff --git a/libcxx/include/__algorithm/minmax_element.h b/libcxx/include/__algorithm/minmax_element.h --- a/libcxx/include/__algorithm/minmax_element.h +++ b/libcxx/include/__algorithm/minmax_element.h @@ -24,17 +24,17 @@ template class _MinmaxElementLessFunc { - _Comp& __comp; - _Proj& __proj; + _Comp& __comp_; + _Proj& __proj_; public: _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR - _MinmaxElementLessFunc(_Comp& __comp_, _Proj& __proj_) : __comp(__comp_), __proj(__proj_) {} + _MinmaxElementLessFunc(_Comp& __comp, _Proj& __proj) : __comp_(__comp), __proj_(__proj) {} template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(_Iter& __it1, _Iter& __it2) { - return std::__invoke(__comp, std::__invoke(__proj, *__it1), std::__invoke(__proj, *__it2)); + return std::__invoke(__comp_, std::__invoke(__proj_, *__it1), std::__invoke(__proj_, *__it2)); } }; diff --git a/libcxx/include/__algorithm/remove.h b/libcxx/include/__algorithm/remove.h --- a/libcxx/include/__algorithm/remove.h +++ b/libcxx/include/__algorithm/remove.h @@ -22,15 +22,15 @@ template _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator -remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) +remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { - __first = _VSTD::find(__first, __last, __value_); + __first = _VSTD::find(__first, __last, __value); if (__first != __last) { _ForwardIterator __i = __first; while (++__i != __last) { - if (!(*__i == __value_)) + if (!(*__i == __value)) { *__first = _VSTD::move(*__i); ++__first; diff --git a/libcxx/include/__algorithm/remove_copy.h b/libcxx/include/__algorithm/remove_copy.h --- a/libcxx/include/__algorithm/remove_copy.h +++ b/libcxx/include/__algorithm/remove_copy.h @@ -20,11 +20,11 @@ template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator -remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value_) +remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value) { for (; __first != __last; ++__first) { - if (!(*__first == __value_)) + if (!(*__first == __value)) { *__result = *__first; ++__result; diff --git a/libcxx/include/__algorithm/search_n.h b/libcxx/include/__algorithm/search_n.h --- a/libcxx/include/__algorithm/search_n.h +++ b/libcxx/include/__algorithm/search_n.h @@ -23,7 +23,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator __search_n(_ForwardIterator __first, _ForwardIterator __last, - _Size __count, const _Tp& __value_, _BinaryPredicate __pred, + _Size __count, const _Tp& __value, _BinaryPredicate __pred, forward_iterator_tag) { if (__count <= 0) return __first; @@ -32,7 +32,7 @@ while (true) { if (__first == __last) // return __last if no element matches __value_ return __last; - if (__pred(*__first, __value_)) + if (__pred(*__first, __value)) break; ++__first; } @@ -44,7 +44,7 @@ return __first; if (++__m == __last) // Otherwise if source exhaused, pattern not found return __last; - if (!__pred(*__m, __value_)) // if there is a mismatch, restart with a new __first + if (!__pred(*__m, __value)) // if there is a mismatch, restart with a new __first { __first = __m; ++__first; @@ -57,7 +57,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator __search_n(_RandomAccessIterator __first, _RandomAccessIterator __last, _Size __count, - const _Tp& __value_, _BinaryPredicate __pred, + const _Tp& __value, _BinaryPredicate __pred, random_access_iterator_tag) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; if (__count <= 0) @@ -71,7 +71,7 @@ while (true) { if (__first >= __s) // return __last if no element matches __value_ return __last; - if (__pred(*__first, __value_)) + if (__pred(*__first, __value)) break; ++__first; } @@ -82,7 +82,7 @@ if (++__c == __count) // If pattern exhausted, __first is the answer (works for 1 element pattern) return __first; ++__m; // no need to check range on __m because __s guarantees we have enough source - if (!__pred(*__m, __value_)) // if there is a mismatch, restart with a new __first + if (!__pred(*__m, __value)) // if there is a mismatch, restart with a new __first { __first = __m; ++__first; @@ -94,17 +94,17 @@ template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator search_n( - _ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value_, _BinaryPredicate __pred) { + _ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value, _BinaryPredicate __pred) { return _VSTD::__search_n<_BinaryPredicate&>( - __first, __last, _VSTD::__convert_to_integral(__count), __value_, __pred, + __first, __last, _VSTD::__convert_to_integral(__count), __value, __pred, typename iterator_traits<_ForwardIterator>::iterator_category()); } template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator -search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value_) { +search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value) { typedef typename iterator_traits<_ForwardIterator>::value_type __v; - return _VSTD::search_n(__first, __last, _VSTD::__convert_to_integral(__count), __value_, __equal_to<__v, _Tp>()); + return _VSTD::search_n(__first, __last, _VSTD::__convert_to_integral(__count), __value, __equal_to<__v, _Tp>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/upper_bound.h b/libcxx/include/__algorithm/upper_bound.h --- a/libcxx/include/__algorithm/upper_bound.h +++ b/libcxx/include/__algorithm/upper_bound.h @@ -24,7 +24,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator -__upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) +__upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type; difference_type __len = _VSTD::distance(__first, __last); @@ -33,7 +33,7 @@ difference_type __l2 = _VSTD::__half_positive(__len); _ForwardIterator __m = __first; _VSTD::advance(__m, __l2); - if (__comp(__value_, *__m)) + if (__comp(__value, *__m)) __len = __l2; else { @@ -48,18 +48,18 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator -upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) +upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) { - return _VSTD::__upper_bound<_Compare&>(__first, __last, __value_, __comp); + return _VSTD::__upper_bound<_Compare&>(__first, __last, __value, __comp); } template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator -upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) +upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { - return _VSTD::upper_bound(__first, __last, __value_, + return _VSTD::upper_bound(__first, __last, __value, __less<_Tp, typename iterator_traits<_ForwardIterator>::value_type>()); } diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference --- a/libcxx/include/__bit_reference +++ b/libcxx/include/__bit_reference @@ -250,9 +250,9 @@ template inline _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, _IsConst> -find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) +find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value) { - if (static_cast(__value_)) + if (static_cast(__value)) return _VSTD::__find_bool_true(__first, static_cast(__last - __first)); return _VSTD::__find_bool_false(__first, static_cast(__last - __first)); } @@ -324,9 +324,9 @@ template inline _LIBCPP_INLINE_VISIBILITY typename __bit_iterator<_Cp, _IsConst>::difference_type -count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) +count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value) { - if (static_cast(__value_)) + if (static_cast(__value)) return _VSTD::__count_bool_true(__first, static_cast(__last - __first)); return _VSTD::__count_bool_false(__first, static_cast(__last - __first)); } @@ -396,11 +396,11 @@ template inline _LIBCPP_INLINE_VISIBILITY void -fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value_) +fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value) { if (__n > 0) { - if (__value_) + if (__value) _VSTD::__fill_n_true(__first, __n); else _VSTD::__fill_n_false(__first, __n); @@ -412,9 +412,9 @@ template inline _LIBCPP_INLINE_VISIBILITY void -fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value_) +fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value) { - _VSTD::fill_n(__first, static_cast(__last - __first), __value_); + _VSTD::fill_n(__first, static_cast(__last - __first), __value); } // copy diff --git a/libcxx/include/__chrono/duration.h b/libcxx/include/__chrono/duration.h --- a/libcxx/include/__chrono/duration.h +++ b/libcxx/include/__chrono/duration.h @@ -286,10 +286,10 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator*=(const rep& rhs) {__rep_ *= rhs; return *this;} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator/=(const rep& rhs) {__rep_ /= rhs; return *this;} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const rep& rhs) {__rep_ %= rhs; return *this;} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const duration& rhs) {__rep_ %= rhs.count(); return *this;} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator*=(const rep& __rhs) {__rep_ *= __rhs; return *this;} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator/=(const rep& __rhs) {__rep_ /= __rhs; return *this;} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const rep& __rhs) {__rep_ %= __rhs; return *this;} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const duration& __rhs) {__rep_ %= __rhs.count(); return *this;} // special values diff --git a/libcxx/include/__chrono/time_point.h b/libcxx/include/__chrono/time_point.h --- a/libcxx/include/__chrono/time_point.h +++ b/libcxx/include/__chrono/time_point.h @@ -47,12 +47,12 @@ // conversions template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 - time_point(const time_point& t, + time_point(const time_point& __t, typename enable_if < is_convertible<_Duration2, duration>::value >::type* = nullptr) - : __d_(t.time_since_epoch()) {} + : __d_(__t.time_since_epoch()) {} // observer diff --git a/libcxx/include/__chrono/year_month_weekday.h b/libcxx/include/__chrono/year_month_weekday.h --- a/libcxx/include/__chrono/year_month_weekday.h +++ b/libcxx/include/__chrono/year_month_weekday.h @@ -47,10 +47,10 @@ : year_month_weekday(__from_days(__sysd.time_since_epoch())) {} _LIBCPP_HIDE_FROM_ABI inline explicit constexpr year_month_weekday(const local_days& __locd) noexcept : year_month_weekday(__from_days(__locd.time_since_epoch())) {} - _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator+=(const months& m) noexcept; - _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator-=(const months& m) noexcept; - _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator+=(const years& y) noexcept; - _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator-=(const years& y) noexcept; + _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator+=(const months&) noexcept; + _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator-=(const months&) noexcept; + _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator+=(const years&) noexcept; + _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator-=(const years&) noexcept; _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y; } _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; } diff --git a/libcxx/include/__filesystem/copy_options.h b/libcxx/include/__filesystem/copy_options.h --- a/libcxx/include/__filesystem/copy_options.h +++ b/libcxx/include/__filesystem/copy_options.h @@ -38,41 +38,41 @@ }; _LIBCPP_INLINE_VISIBILITY -inline constexpr copy_options operator&(copy_options _LHS, copy_options _RHS) { - return static_cast(static_cast(_LHS) & - static_cast(_RHS)); +inline constexpr copy_options operator&(copy_options __lhs, copy_options __rhs) { + return static_cast(static_cast(__lhs) & + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr copy_options operator|(copy_options _LHS, copy_options _RHS) { - return static_cast(static_cast(_LHS) | - static_cast(_RHS)); +inline constexpr copy_options operator|(copy_options __lhs, copy_options __rhs) { + return static_cast(static_cast(__lhs) | + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr copy_options operator^(copy_options _LHS, copy_options _RHS) { - return static_cast(static_cast(_LHS) ^ - static_cast(_RHS)); +inline constexpr copy_options operator^(copy_options __lhs, copy_options __rhs) { + return static_cast(static_cast(__lhs) ^ + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr copy_options operator~(copy_options _LHS) { - return static_cast(~static_cast(_LHS)); +inline constexpr copy_options operator~(copy_options __lhs) { + return static_cast(~static_cast(__lhs)); } _LIBCPP_INLINE_VISIBILITY -inline copy_options& operator&=(copy_options& _LHS, copy_options _RHS) { - return _LHS = _LHS & _RHS; +inline copy_options& operator&=(copy_options& __lhs, copy_options __rhs) { + return __lhs = __lhs & __rhs; } _LIBCPP_INLINE_VISIBILITY -inline copy_options& operator|=(copy_options& _LHS, copy_options _RHS) { - return _LHS = _LHS | _RHS; +inline copy_options& operator|=(copy_options& __lhs, copy_options __rhs) { + return __lhs = __lhs | __rhs; } _LIBCPP_INLINE_VISIBILITY -inline copy_options& operator^=(copy_options& _LHS, copy_options _RHS) { - return _LHS = _LHS ^ _RHS; +inline copy_options& operator^=(copy_options& __lhs, copy_options __rhs) { + return __lhs = __lhs ^ __rhs; } _LIBCPP_AVAILABILITY_FILESYSTEM_POP diff --git a/libcxx/include/__filesystem/directory_options.h b/libcxx/include/__filesystem/directory_options.h --- a/libcxx/include/__filesystem/directory_options.h +++ b/libcxx/include/__filesystem/directory_options.h @@ -30,47 +30,47 @@ }; _LIBCPP_INLINE_VISIBILITY -inline constexpr directory_options operator&(directory_options _LHS, - directory_options _RHS) { - return static_cast(static_cast(_LHS) & - static_cast(_RHS)); +inline constexpr directory_options operator&(directory_options __lhs, + directory_options __rhs) { + return static_cast(static_cast(__lhs) & + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr directory_options operator|(directory_options _LHS, - directory_options _RHS) { - return static_cast(static_cast(_LHS) | - static_cast(_RHS)); +inline constexpr directory_options operator|(directory_options __lhs, + directory_options __rhs) { + return static_cast(static_cast(__lhs) | + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr directory_options operator^(directory_options _LHS, - directory_options _RHS) { - return static_cast(static_cast(_LHS) ^ - static_cast(_RHS)); +inline constexpr directory_options operator^(directory_options __lhs, + directory_options __rhs) { + return static_cast(static_cast(__lhs) ^ + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr directory_options operator~(directory_options _LHS) { - return static_cast(~static_cast(_LHS)); +inline constexpr directory_options operator~(directory_options __lhs) { + return static_cast(~static_cast(__lhs)); } _LIBCPP_INLINE_VISIBILITY -inline directory_options& operator&=(directory_options& _LHS, - directory_options _RHS) { - return _LHS = _LHS & _RHS; +inline directory_options& operator&=(directory_options& __lhs, + directory_options __rhs) { + return __lhs = __lhs & __rhs; } _LIBCPP_INLINE_VISIBILITY -inline directory_options& operator|=(directory_options& _LHS, - directory_options _RHS) { - return _LHS = _LHS | _RHS; +inline directory_options& operator|=(directory_options& __lhs, + directory_options __rhs) { + return __lhs = __lhs | __rhs; } _LIBCPP_INLINE_VISIBILITY -inline directory_options& operator^=(directory_options& _LHS, - directory_options _RHS) { - return _LHS = _LHS ^ _RHS; +inline directory_options& operator^=(directory_options& __lhs, + directory_options __rhs) { + return __lhs = __lhs ^ __rhs; } _LIBCPP_AVAILABILITY_FILESYSTEM_POP diff --git a/libcxx/include/__filesystem/operations.h b/libcxx/include/__filesystem/operations.h --- a/libcxx/include/__filesystem/operations.h +++ b/libcxx/include/__filesystem/operations.h @@ -39,10 +39,10 @@ _LIBCPP_FUNC_VIS bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr); _LIBCPP_FUNC_VIS void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code* __ec = nullptr); _LIBCPP_FUNC_VIS void __copy(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr); -_LIBCPP_FUNC_VIS bool __create_directories(const path& p, error_code* ec = nullptr); +_LIBCPP_FUNC_VIS bool __create_directories(const path&, error_code* = nullptr); _LIBCPP_FUNC_VIS void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr); -_LIBCPP_FUNC_VIS bool __create_directory(const path& p, error_code* ec = nullptr); -_LIBCPP_FUNC_VIS bool __create_directory(const path& p, const path& attributes, error_code* ec = nullptr); +_LIBCPP_FUNC_VIS bool __create_directory(const path&, error_code* = nullptr); +_LIBCPP_FUNC_VIS bool __create_directory(const path&, const path& __attributes, error_code* = nullptr); _LIBCPP_FUNC_VIS void __create_hard_link(const path& __to, const path& __new_hard_link, error_code* __ec = nullptr); _LIBCPP_FUNC_VIS void __create_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr); _LIBCPP_FUNC_VIS path __current_path(error_code* __ec = nullptr); @@ -52,14 +52,14 @@ _LIBCPP_FUNC_VIS uintmax_t __file_size(const path&, error_code* __ec = nullptr); _LIBCPP_FUNC_VIS uintmax_t __hard_link_count(const path&, error_code* __ec = nullptr); _LIBCPP_FUNC_VIS file_status __symlink_status(const path&, error_code* __ec = nullptr); -_LIBCPP_FUNC_VIS file_time_type __last_write_time(const path& p, error_code* ec = nullptr); -_LIBCPP_FUNC_VIS void __last_write_time(const path& p, file_time_type new_time, error_code* ec = nullptr); +_LIBCPP_FUNC_VIS file_time_type __last_write_time(const path&, error_code* __ec = nullptr); +_LIBCPP_FUNC_VIS void __last_write_time(const path&, file_time_type __new_time, error_code* __ec = nullptr); _LIBCPP_FUNC_VIS path __weakly_canonical(path const& __p, error_code* __ec = nullptr); -_LIBCPP_FUNC_VIS path __read_symlink(const path& p, error_code* ec = nullptr); -_LIBCPP_FUNC_VIS uintmax_t __remove_all(const path& p, error_code* ec = nullptr); -_LIBCPP_FUNC_VIS bool __remove(const path& p, error_code* ec = nullptr); -_LIBCPP_FUNC_VIS void __rename(const path& from, const path& to, error_code* ec = nullptr); -_LIBCPP_FUNC_VIS void __resize_file(const path& p, uintmax_t size, error_code* ec = nullptr); +_LIBCPP_FUNC_VIS path __read_symlink(const path&, error_code* __ec = nullptr); +_LIBCPP_FUNC_VIS uintmax_t __remove_all(const path&, error_code* __ec = nullptr); +_LIBCPP_FUNC_VIS bool __remove(const path&, error_code* __ec = nullptr); +_LIBCPP_FUNC_VIS void __rename(const path& __from, const path& __to, error_code* __ec = nullptr); +_LIBCPP_FUNC_VIS void __resize_file(const path&, uintmax_t __size, error_code* = nullptr); _LIBCPP_FUNC_VIS path __temp_directory_path(error_code* __ec = nullptr); inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p) { return __absolute(__p); } @@ -118,7 +118,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; } inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p) { return is_directory(__status(__p)); } inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p, error_code& __ec) noexcept { return is_directory(__status(__p, &__ec)); } -_LIBCPP_FUNC_VIS bool __fs_is_empty(const path& p, error_code* ec = nullptr); +_LIBCPP_FUNC_VIS bool __fs_is_empty(const path& __p, error_code* __ec = nullptr); inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p) { return __fs_is_empty(__p); } inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p, error_code& __ec) { return __fs_is_empty(__p, &__ec); } inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; } diff --git a/libcxx/include/__filesystem/perm_options.h b/libcxx/include/__filesystem/perm_options.h --- a/libcxx/include/__filesystem/perm_options.h +++ b/libcxx/include/__filesystem/perm_options.h @@ -31,41 +31,41 @@ }; _LIBCPP_INLINE_VISIBILITY -inline constexpr perm_options operator&(perm_options _LHS, perm_options _RHS) { - return static_cast(static_cast(_LHS) & - static_cast(_RHS)); +inline constexpr perm_options operator&(perm_options __lhs, perm_options __rhs) { + return static_cast(static_cast(__lhs) & + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr perm_options operator|(perm_options _LHS, perm_options _RHS) { - return static_cast(static_cast(_LHS) | - static_cast(_RHS)); +inline constexpr perm_options operator|(perm_options __lhs, perm_options __rhs) { + return static_cast(static_cast(__lhs) | + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr perm_options operator^(perm_options _LHS, perm_options _RHS) { - return static_cast(static_cast(_LHS) ^ - static_cast(_RHS)); +inline constexpr perm_options operator^(perm_options __lhs, perm_options __rhs) { + return static_cast(static_cast(__lhs) ^ + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr perm_options operator~(perm_options _LHS) { - return static_cast(~static_cast(_LHS)); +inline constexpr perm_options operator~(perm_options __lhs) { + return static_cast(~static_cast(__lhs)); } _LIBCPP_INLINE_VISIBILITY -inline perm_options& operator&=(perm_options& _LHS, perm_options _RHS) { - return _LHS = _LHS & _RHS; +inline perm_options& operator&=(perm_options& __lhs, perm_options __rhs) { + return __lhs = __lhs & __rhs; } _LIBCPP_INLINE_VISIBILITY -inline perm_options& operator|=(perm_options& _LHS, perm_options _RHS) { - return _LHS = _LHS | _RHS; +inline perm_options& operator|=(perm_options& __lhs, perm_options __rhs) { + return __lhs = __lhs | __rhs; } _LIBCPP_INLINE_VISIBILITY -inline perm_options& operator^=(perm_options& _LHS, perm_options _RHS) { - return _LHS = _LHS ^ _RHS; +inline perm_options& operator^=(perm_options& __lhs, perm_options __rhs) { + return __lhs = __lhs ^ __rhs; } _LIBCPP_AVAILABILITY_FILESYSTEM_POP diff --git a/libcxx/include/__filesystem/perms.h b/libcxx/include/__filesystem/perms.h --- a/libcxx/include/__filesystem/perms.h +++ b/libcxx/include/__filesystem/perms.h @@ -55,36 +55,36 @@ }; _LIBCPP_INLINE_VISIBILITY -inline constexpr perms operator&(perms _LHS, perms _RHS) { - return static_cast(static_cast(_LHS) & - static_cast(_RHS)); +inline constexpr perms operator&(perms __lhs, perms __rhs) { + return static_cast(static_cast(__lhs) & + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr perms operator|(perms _LHS, perms _RHS) { - return static_cast(static_cast(_LHS) | - static_cast(_RHS)); +inline constexpr perms operator|(perms __lhs, perms __rhs) { + return static_cast(static_cast(__lhs) | + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr perms operator^(perms _LHS, perms _RHS) { - return static_cast(static_cast(_LHS) ^ - static_cast(_RHS)); +inline constexpr perms operator^(perms __lhs, perms __rhs) { + return static_cast(static_cast(__lhs) ^ + static_cast(__rhs)); } _LIBCPP_INLINE_VISIBILITY -inline constexpr perms operator~(perms _LHS) { - return static_cast(~static_cast(_LHS)); +inline constexpr perms operator~(perms __lhs) { + return static_cast(~static_cast(__lhs)); } _LIBCPP_INLINE_VISIBILITY -inline perms& operator&=(perms& _LHS, perms _RHS) { return _LHS = _LHS & _RHS; } +inline perms& operator&=(perms& __lhs, perms __rhs) { return __lhs = __lhs & __rhs; } _LIBCPP_INLINE_VISIBILITY -inline perms& operator|=(perms& _LHS, perms _RHS) { return _LHS = _LHS | _RHS; } +inline perms& operator|=(perms& __lhs, perms __rhs) { return __lhs = __lhs | __rhs; } _LIBCPP_INLINE_VISIBILITY -inline perms& operator^=(perms& _LHS, perms _RHS) { return _LHS = _LHS ^ _RHS; } +inline perms& operator^=(perms& __lhs, perms __rhs) { return __lhs = __lhs ^ __rhs; } _LIBCPP_AVAILABILITY_FILESYSTEM_POP diff --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h --- a/libcxx/include/__format/formatter_output.h +++ b/libcxx/include/__format/formatter_output.h @@ -33,8 +33,8 @@ namespace __formatter { -_LIBCPP_HIDE_FROM_ABI constexpr char __hex_to_upper(char c) { - switch (c) { +_LIBCPP_HIDE_FROM_ABI constexpr char __hex_to_upper(char __c) { + switch (__c) { case 'a': return 'A'; case 'b': @@ -48,7 +48,7 @@ case 'f': return 'F'; } - return c; + return __c; } struct _LIBCPP_TYPE_VIS __padding_size_result { diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h --- a/libcxx/include/__format/parser_std_format_spec.h +++ b/libcxx/include/__format/parser_std_format_spec.h @@ -64,7 +64,7 @@ template _LIBCPP_HIDE_FROM_ABI constexpr uint32_t -__substitute_arg_id(basic_format_arg<_Context> _Arg) { +__substitute_arg_id(basic_format_arg<_Context> __format_arg) { return visit_format_arg( [](auto __arg) -> uint32_t { using _Type = decltype(__arg); @@ -88,7 +88,7 @@ __throw_format_error("A format-spec arg-id replacement argument " "isn't an integral type"); }, - _Arg); + __format_arg); } /** Helper struct returned from @ref __get_string_alignment. */ diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -390,9 +390,9 @@ typedef __base<_Rp(_ArgTypes...)> __func; __func* __f_; - _LIBCPP_NO_CFI static __func* __as_base(void* p) + _LIBCPP_NO_CFI static __func* __as_base(void* __p) { - return reinterpret_cast<__func*>(p); + return reinterpret_cast<__func*>(__p); } public: diff --git a/libcxx/include/__iterator/back_insert_iterator.h b/libcxx/include/__iterator/back_insert_iterator.h --- a/libcxx/include/__iterator/back_insert_iterator.h +++ b/libcxx/include/__iterator/back_insert_iterator.h @@ -46,11 +46,11 @@ typedef _Container container_type; _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit back_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {} - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(const typename _Container::value_type& __value_) - {container->push_back(__value_); return *this;} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(const typename _Container::value_type& __value) + {container->push_back(__value); return *this;} #ifndef _LIBCPP_CXX03_LANG - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(typename _Container::value_type&& __value_) - {container->push_back(_VSTD::move(__value_)); return *this;} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(typename _Container::value_type&& __value) + {container->push_back(_VSTD::move(__value)); return *this;} #endif // _LIBCPP_CXX03_LANG _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator*() {return *this;} _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator++() {return *this;} diff --git a/libcxx/include/__iterator/front_insert_iterator.h b/libcxx/include/__iterator/front_insert_iterator.h --- a/libcxx/include/__iterator/front_insert_iterator.h +++ b/libcxx/include/__iterator/front_insert_iterator.h @@ -46,11 +46,11 @@ typedef _Container container_type; _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit front_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(const typename _Container::value_type& __value_) - {container->push_front(__value_); return *this;} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(const typename _Container::value_type& __value) + {container->push_front(__value); return *this;} #ifndef _LIBCPP_CXX03_LANG - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(typename _Container::value_type&& __value_) - {container->push_front(_VSTD::move(__value_)); return *this;} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(typename _Container::value_type&& __value) + {container->push_front(_VSTD::move(__value)); return *this;} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator++() {return *this;} diff --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h --- a/libcxx/include/__iterator/insert_iterator.h +++ b/libcxx/include/__iterator/insert_iterator.h @@ -57,11 +57,11 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i) : container(_VSTD::addressof(__x)), iter(__i) {} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(const typename _Container::value_type& __value_) - {iter = container->insert(iter, __value_); ++iter; return *this;} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(const typename _Container::value_type& __value) + {iter = container->insert(iter, __value); ++iter; return *this;} #ifndef _LIBCPP_CXX03_LANG - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(typename _Container::value_type&& __value_) - {iter = container->insert(iter, _VSTD::move(__value_)); ++iter; return *this;} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(typename _Container::value_type&& __value) + {iter = container->insert(iter, _VSTD::move(__value)); ++iter; return *this;} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator++() {return *this;} diff --git a/libcxx/include/__iterator/ostream_iterator.h b/libcxx/include/__iterator/ostream_iterator.h --- a/libcxx/include/__iterator/ostream_iterator.h +++ b/libcxx/include/__iterator/ostream_iterator.h @@ -53,9 +53,9 @@ : __out_stream_(_VSTD::addressof(__s)), __delim_(nullptr) {} _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT : __out_stream_(_VSTD::addressof(__s)), __delim_(__delimiter) {} - _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator=(const _Tp& __value_) + _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator=(const _Tp& __value) { - *__out_stream_ << __value_; + *__out_stream_ << __value; if (__delim_) *__out_stream_ << __delim_; return *this; diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h --- a/libcxx/include/__iterator/reverse_iterator.h +++ b/libcxx/include/__iterator/reverse_iterator.h @@ -136,7 +136,7 @@ #if _LIBCPP_STD_VER > 17 _LIBCPP_INLINE_VISIBILITY constexpr pointer operator->() const - requires is_pointer_v<_Iter> || requires(const _Iter i) { i.operator->(); } + requires is_pointer_v<_Iter> || requires(const _Iter __i) { __i.operator->(); } { if constexpr (is_pointer_v<_Iter>) { return std::prev(current); diff --git a/libcxx/include/__numeric/iota.h b/libcxx/include/__numeric/iota.h --- a/libcxx/include/__numeric/iota.h +++ b/libcxx/include/__numeric/iota.h @@ -21,10 +21,10 @@ template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void -iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value_) +iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) { - for (; __first != __last; ++__first, (void) ++__value_) - *__first = __value_; + for (; __first != __last; ++__first, (void) ++__value) + *__first = __value; } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__random/piecewise_constant_distribution.h b/libcxx/include/__random/piecewise_constant_distribution.h --- a/libcxx/include/__random/piecewise_constant_distribution.h +++ b/libcxx/include/__random/piecewise_constant_distribution.h @@ -43,8 +43,8 @@ param_type(); template - param_type(_InputIteratorB __fB, _InputIteratorB __lB, - _InputIteratorW __fW); + param_type(_InputIteratorB __f_b, _InputIteratorB __l_b, + _InputIteratorW __f_w); #ifndef _LIBCPP_CXX03_LANG template param_type(initializer_list __bl, _UnaryOperation __fw); @@ -94,10 +94,10 @@ piecewise_constant_distribution() {} template _LIBCPP_INLINE_VISIBILITY - piecewise_constant_distribution(_InputIteratorB __fB, - _InputIteratorB __lB, - _InputIteratorW __fW) - : __p_(__fB, __lB, __fW) {} + piecewise_constant_distribution(_InputIteratorB __f_b, + _InputIteratorB __l_b, + _InputIteratorW __f_w) + : __p_(__f_b, __l_b, __f_w) {} #ifndef _LIBCPP_CXX03_LANG template @@ -215,8 +215,8 @@ template template piecewise_constant_distribution<_RealType>::param_type::param_type( - _InputIteratorB __fB, _InputIteratorB __lB, _InputIteratorW __fW) - : __b_(__fB, __lB) + _InputIteratorB __f_b, _InputIteratorB __l_b, _InputIteratorW __f_w) + : __b_(__f_b, __l_b) { if (__b_.size() < 2) { @@ -229,8 +229,8 @@ else { __densities_.reserve(__b_.size() - 1); - for (size_t __i = 0; __i < __b_.size() - 1; ++__i, ++__fW) - __densities_.push_back(*__fW); + for (size_t __i = 0; __i < __b_.size() - 1; ++__i, ++__f_w) + __densities_.push_back(*__f_w); __init(); } } diff --git a/libcxx/include/__random/piecewise_linear_distribution.h b/libcxx/include/__random/piecewise_linear_distribution.h --- a/libcxx/include/__random/piecewise_linear_distribution.h +++ b/libcxx/include/__random/piecewise_linear_distribution.h @@ -43,8 +43,8 @@ param_type(); template - param_type(_InputIteratorB __fB, _InputIteratorB __lB, - _InputIteratorW __fW); + param_type(_InputIteratorB __f_b, _InputIteratorB __l_b, + _InputIteratorW __f_w); #ifndef _LIBCPP_CXX03_LANG template param_type(initializer_list __bl, _UnaryOperation __fw); @@ -94,10 +94,10 @@ piecewise_linear_distribution() {} template _LIBCPP_INLINE_VISIBILITY - piecewise_linear_distribution(_InputIteratorB __fB, - _InputIteratorB __lB, - _InputIteratorW __fW) - : __p_(__fB, __lB, __fW) {} + piecewise_linear_distribution(_InputIteratorB __f_b, + _InputIteratorB __l_b, + _InputIteratorW __f_w) + : __p_(__f_b, __l_b, __f_w) {} #ifndef _LIBCPP_CXX03_LANG template @@ -219,8 +219,8 @@ template template piecewise_linear_distribution<_RealType>::param_type::param_type( - _InputIteratorB __fB, _InputIteratorB __lB, _InputIteratorW __fW) - : __b_(__fB, __lB) + _InputIteratorB __f_b, _InputIteratorB __l_b, _InputIteratorW __f_w) + : __b_(__f_b, __l_b) { if (__b_.size() < 2) { @@ -233,8 +233,8 @@ else { __densities_.reserve(__b_.size()); - for (size_t __i = 0; __i < __b_.size(); ++__i, ++__fW) - __densities_.push_back(*__fW); + for (size_t __i = 0; __i < __b_.size(); ++__i, ++__f_w) + __densities_.push_back(*__f_w); __init(); } } diff --git a/libcxx/include/__ranges/zip_view.h b/libcxx/include/__ranges/zip_view.h --- a/libcxx/include/__ranges/zip_view.h +++ b/libcxx/include/__ranges/zip_view.h @@ -488,10 +488,10 @@ _LIBCPP_HIDE_FROM_ABI constexpr auto operator()() const noexcept { return empty_view>{}; } template - _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ranges&&... rs) const - noexcept(noexcept(zip_view...>(std::forward<_Ranges>(rs)...))) - -> decltype(zip_view...>(std::forward<_Ranges>(rs)...)) { - return zip_view...>(std::forward<_Ranges>(rs)...); + _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ranges&&... __rs) const + noexcept(noexcept(zip_view...>(std::forward<_Ranges>(__rs)...))) + -> decltype(zip_view...>(std::forward<_Ranges>(__rs)...)) { + return zip_view...>(std::forward<_Ranges>(__rs)...); } }; diff --git a/libcxx/include/__support/win32/locale_win32.h b/libcxx/include/__support/win32/locale_win32.h --- a/libcxx/include/__support/win32/locale_win32.h +++ b/libcxx/include/__support/win32/locale_win32.h @@ -186,28 +186,28 @@ // Locale management functions #define freelocale _free_locale // FIXME: base currently unused. Needs manual work to construct the new locale -locale_t newlocale( int mask, const char * locale, locale_t base ); +locale_t newlocale( int __mask, const char * __locale, locale_t __base ); // uselocale can't be implemented on Windows because Windows allows partial modification // of thread-local locale and so _get_current_locale() returns a copy while uselocale does // not create any copies. // We can still implement raii even without uselocale though. -lconv *localeconv_l( locale_t &loc ); -size_t mbrlen_l( const char *__restrict s, size_t n, - mbstate_t *__restrict ps, locale_t loc); -size_t mbsrtowcs_l( wchar_t *__restrict dst, const char **__restrict src, - size_t len, mbstate_t *__restrict ps, locale_t loc ); -size_t wcrtomb_l( char *__restrict s, wchar_t wc, mbstate_t *__restrict ps, - locale_t loc); -size_t mbrtowc_l( wchar_t *__restrict pwc, const char *__restrict s, - size_t n, mbstate_t *__restrict ps, locale_t loc); -size_t mbsnrtowcs_l( wchar_t *__restrict dst, const char **__restrict src, - size_t nms, size_t len, mbstate_t *__restrict ps, locale_t loc); -size_t wcsnrtombs_l( char *__restrict dst, const wchar_t **__restrict src, - size_t nwc, size_t len, mbstate_t *__restrict ps, locale_t loc); -wint_t btowc_l( int c, locale_t loc ); -int wctob_l( wint_t c, locale_t loc ); +lconv *localeconv_l( locale_t & __loc ); +size_t mbrlen_l( const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps, locale_t __loc); +size_t mbsrtowcs_l( wchar_t *__restrict __dst, const char **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, locale_t __loc ); +size_t wcrtomb_l( char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps, + locale_t __loc); +size_t mbrtowc_l( wchar_t *__restrict __pwc, const char *__restrict __s, + size_t __n, mbstate_t *__restrict __ps, locale_t __loc); +size_t mbsnrtowcs_l( wchar_t *__restrict __dst, const char **__restrict __src, + size_t __nms, size_t __len, mbstate_t *__restrict __ps, locale_t __loc); +size_t wcsnrtombs_l( char *__restrict __dst, const wchar_t **__restrict __src, + size_t __nwc, size_t __len, mbstate_t *__restrict __ps, locale_t __loc); +wint_t btowc_l( int __c, locale_t __loc ); +int wctob_l( wint_t __c, locale_t __loc ); decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l ); @@ -225,16 +225,16 @@ #endif inline _LIBCPP_INLINE_VISIBILITY int -islower_l(int c, _locale_t loc) +islower_l(int __c, _locale_t __loc) { - return _islower_l((int)c, loc); + return _islower_l((int)__c, __loc); } inline _LIBCPP_INLINE_VISIBILITY int -isupper_l(int c, _locale_t loc) +isupper_l(int __c, _locale_t __loc) { - return _isupper_l((int)c, loc); + return _isupper_l((int)__c, __loc); } #define isdigit_l _isdigit_l @@ -266,18 +266,18 @@ #define sprintf_l( __s, __l, __f, ... ) _sprintf_l( __s, __f, __l, __VA_ARGS__ ) #define vsprintf_l( __s, __l, __f, ... ) _vsprintf_l( __s, __f, __l, __VA_ARGS__ ) #define vsnprintf_l( __s, __n, __l, __f, ... ) _vsnprintf_l( __s, __n, __f, __l, __VA_ARGS__ ) -_LIBCPP_FUNC_VIS int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...); -_LIBCPP_FUNC_VIS int asprintf_l( char **ret, locale_t loc, const char *format, ... ); -_LIBCPP_FUNC_VIS int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap ); +_LIBCPP_FUNC_VIS int snprintf_l(char *__ret, size_t __n, locale_t __loc, const char *__format, ...); +_LIBCPP_FUNC_VIS int asprintf_l( char **__ret, locale_t __loc, const char *__format, ... ); +_LIBCPP_FUNC_VIS int vasprintf_l( char **__ret, locale_t __loc, const char *__format, va_list __ap ); // not-so-pressing FIXME: use locale to determine blank characters -inline int isblank_l( int c, locale_t /*loc*/ ) +inline int isblank_l( int __c, locale_t /*loc*/ ) { - return ( c == ' ' || c == '\t' ); + return ( __c == ' ' || __c == '\t' ); } -inline int iswblank_l( wint_t c, locale_t /*loc*/ ) +inline int iswblank_l( wint_t __c, locale_t /*loc*/ ) { - return ( c == L' ' || c == L'\t' ); + return ( __c == L' ' || __c == L'\t' ); } #endif // _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H diff --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support --- a/libcxx/include/__threading_support +++ b/libcxx/include/__threading_support @@ -201,15 +201,15 @@ // Execute once _LIBCPP_THREAD_ABI_VISIBILITY -int __libcpp_execute_once(__libcpp_exec_once_flag *flag, - void (*init_routine)()); +int __libcpp_execute_once(__libcpp_exec_once_flag *__flag, + void (*__init_routine)()); // Thread id _LIBCPP_THREAD_ABI_VISIBILITY -bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2); +bool __libcpp_thread_id_equal(__libcpp_thread_id __t1, __libcpp_thread_id __t2); _LIBCPP_THREAD_ABI_VISIBILITY -bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2); +bool __libcpp_thread_id_less(__libcpp_thread_id __t1, __libcpp_thread_id __t2); // Thread _LIBCPP_THREAD_ABI_VISIBILITY @@ -347,22 +347,22 @@ } // Execute once -int __libcpp_execute_once(__libcpp_exec_once_flag *flag, - void (*init_routine)()) { - return pthread_once(flag, init_routine); +int __libcpp_execute_once(__libcpp_exec_once_flag *__flag, + void (*__init_routine)()) { + return pthread_once(__flag, __init_routine); } // Thread id // Returns non-zero if the thread ids are equal, otherwise 0 -bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2) +bool __libcpp_thread_id_equal(__libcpp_thread_id __t1, __libcpp_thread_id __t2) { - return t1 == t2; + return __t1 == __t2; } // Returns non-zero if t1 < t2, otherwise 0 -bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2) +bool __libcpp_thread_id_less(__libcpp_thread_id __t1, __libcpp_thread_id __t2) { - return t1 < t2; + return __t1 < __t2; } // Thread diff --git a/libcxx/include/any b/libcxx/include/any --- a/libcxx/include/any +++ b/libcxx/include/any @@ -271,7 +271,7 @@ is_copy_constructible<_Tp>::value> > _LIBCPP_INLINE_VISIBILITY - _Tp& emplace(_Args&&... args); + _Tp& emplace(_Args&&...); template , diff --git a/libcxx/include/atomic b/libcxx/include/atomic --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -906,8 +906,8 @@ #else __cxx_atomic_base_impl() _NOEXCEPT : __a_value() {} #endif // _LIBCPP_CXX03_LANG - _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp value) _NOEXCEPT - : __a_value(value) {} + _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp __value) _NOEXCEPT + : __a_value(__value) {} _LIBCPP_DISABLE_EXTENSION_WARNING _Atomic(_Tp) __a_value; }; @@ -1451,8 +1451,8 @@ "std::atomic requires that 'T' be a trivially copyable type"); _LIBCPP_INLINE_VISIBILITY __cxx_atomic_impl() _NOEXCEPT = default; - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl(_Tp value) _NOEXCEPT - : _Base(value) {} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl(_Tp __value) _NOEXCEPT + : _Base(__value) {} }; #if defined(__linux__) || (defined(_AIX) && !defined(__64BIT__)) diff --git a/libcxx/include/barrier b/libcxx/include/barrier --- a/libcxx/include/barrier +++ b/libcxx/include/barrier @@ -130,10 +130,10 @@ { } [[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY - arrival_token arrive(ptrdiff_t update) + arrival_token arrive(ptrdiff_t __update) { auto const __old_phase = __phase_.load(memory_order_relaxed); - for(; update; --update) + for(; __update; --__update) if(__arrive_barrier_algorithm_base(__base_.get(), __old_phase)) { __completion_(); __expected_ += __expected_adjustment_.load(memory_order_relaxed); @@ -300,9 +300,9 @@ barrier& operator=(barrier const&) = delete; [[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY - arrival_token arrive(ptrdiff_t update = 1) + arrival_token arrive(ptrdiff_t __update = 1) { - return __b.arrive(update); + return __b.arrive(__update); } _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void wait(arrival_token&& __phase) const diff --git a/libcxx/include/charconv b/libcxx/include/charconv --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -688,11 +688,11 @@ return __subject_seq_combinator( __first, __last, __value, - [](const char* _First, const char* _Last, + [](const char* __f, const char* __l, _Tp& __val) -> from_chars_result { __output_type __a, __b; - auto __p = __tx::__read(_First, _Last, __a, __b); - if (__p == _Last || !__in_pattern(*__p)) + auto __p = __tx::__read(__f, __l, __a, __b); + if (__p == __l || !__in_pattern(*__p)) { __output_type __m = numeric_limits<_Tp>::max(); if (__m >= __a && __m - __a >= __b) @@ -724,22 +724,22 @@ return __subject_seq_combinator( __first, __last, __value, [](const char* __p, const char* __lastp, _Tp& __val, - int _Base) -> from_chars_result { + int __b) -> from_chars_result { using __tl = numeric_limits<_Tp>; - auto __digits = __tl::digits / log2f(float(_Base)); - _Tp __a = __in_pattern(*__p++, _Base).__val, __b = 0; + auto __digits = __tl::digits / log2f(float(__b)); + _Tp __x = __in_pattern(*__p++, __b).__val, __y = 0; for (int __i = 1; __p != __lastp; ++__i, ++__p) { - if (auto __c = __in_pattern(*__p, _Base)) + if (auto __c = __in_pattern(*__p, __b)) { if (__i < __digits - 1) - __a = __a * _Base + __c.__val; + __x = __x * __b + __c.__val; else { - if (!__itoa::__mul_overflowed(__a, _Base, __a)) + if (!__itoa::__mul_overflowed(__x, __b, __x)) ++__p; - __b = __c.__val; + __y = __c.__val; break; } } @@ -747,11 +747,11 @@ break; } - if (__p == __lastp || !__in_pattern(*__p, _Base)) + if (__p == __lastp || !__in_pattern(*__p, __b)) { - if (__tl::max() - __a >= __b) + if (__tl::max() - __x >= __y) { - __val = __a + __b; + __val = __x + __y; return {__p, {}}; } } diff --git a/libcxx/include/cmath b/libcxx/include/cmath --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -530,9 +530,9 @@ using ::truncl _LIBCPP_USING_IF_EXISTS; #if _LIBCPP_STD_VER > 14 -inline _LIBCPP_INLINE_VISIBILITY float hypot( float x, float y, float z ) { return sqrt(x*x + y*y + z*z); } -inline _LIBCPP_INLINE_VISIBILITY double hypot( double x, double y, double z ) { return sqrt(x*x + y*y + z*z); } -inline _LIBCPP_INLINE_VISIBILITY long double hypot( long double x, long double y, long double z ) { return sqrt(x*x + y*y + z*z); } +inline _LIBCPP_INLINE_VISIBILITY float hypot( float __x, float __y, float __z ) { return sqrt(__x*__x + __y*__y + __z*__z); } +inline _LIBCPP_INLINE_VISIBILITY double hypot( double __x, double __y, double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); } +inline _LIBCPP_INLINE_VISIBILITY long double hypot( long double __x, long double __y, long double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); } template inline _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/codecvt b/libcxx/include/codecvt --- a/libcxx/include/codecvt +++ b/libcxx/include/codecvt @@ -92,10 +92,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf8(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf8(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: virtual result @@ -130,10 +130,10 @@ typedef mbstate_t state_type; _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf8(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf8(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: @@ -168,10 +168,10 @@ typedef mbstate_t state_type; _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf8(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf8(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: @@ -229,10 +229,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: virtual result @@ -268,10 +268,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: virtual result @@ -306,10 +306,10 @@ typedef mbstate_t state_type; _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: @@ -344,10 +344,10 @@ typedef mbstate_t state_type; _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: @@ -382,10 +382,10 @@ typedef mbstate_t state_type; _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: @@ -420,10 +420,10 @@ typedef mbstate_t state_type; _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: @@ -481,10 +481,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf8_utf16(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf8_utf16(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: virtual result @@ -519,10 +519,10 @@ typedef mbstate_t state_type; _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf8_utf16(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf8_utf16(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: @@ -557,10 +557,10 @@ typedef mbstate_t state_type; _LIBCPP_INLINE_VISIBILITY - explicit __codecvt_utf8_utf16(size_t __refs, unsigned long _Maxcode, - codecvt_mode _Mode) - : codecvt(__refs), _Maxcode_(_Maxcode), - _Mode_(_Mode) {} + explicit __codecvt_utf8_utf16(size_t __refs, unsigned long __maxcode, + codecvt_mode __mode) + : codecvt(__refs), _Maxcode_(__maxcode), + _Mode_(__mode) {} _LIBCPP_SUPPRESS_DEPRECATED_POP protected: diff --git a/libcxx/include/condition_variable b/libcxx/include/condition_variable --- a/libcxx/include/condition_variable +++ b/libcxx/include/condition_variable @@ -261,7 +261,7 @@ } _LIBCPP_FUNC_VIS -void notify_all_at_thread_exit(condition_variable& cond, unique_lock lk); +void notify_all_at_thread_exit(condition_variable&, unique_lock); _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/exception b/libcxx/include/exception --- a/libcxx/include/exception +++ b/libcxx/include/exception @@ -216,7 +216,7 @@ _LIBCPP_FUNC_VIS exception_ptr __copy_exception_ptr(void *__except, const void* __ptr); _LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT; -_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr p); +_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr); // This is a built-in template function which automagically extracts the required // information. diff --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd --- a/libcxx/include/experimental/simd +++ b/libcxx/include/experimental/simd @@ -1242,32 +1242,32 @@ template typename _SimdType::value_type reduce(const const_where_expression<_MaskType, _SimdType>&, - typename _SimdType::value_type neutral_element, _BinaryOp binary_op); + typename _SimdType::value_type __neutral_element, _BinaryOp); template typename _SimdType::value_type reduce(const const_where_expression<_MaskType, _SimdType>&, - plus binary_op = {}); + plus = {}); template typename _SimdType::value_type reduce(const const_where_expression<_MaskType, _SimdType>&, - multiplies binary_op); + multiplies); template typename _SimdType::value_type reduce(const const_where_expression<_MaskType, _SimdType>&, - bit_and binary_op); + bit_and); template typename _SimdType::value_type reduce(const const_where_expression<_MaskType, _SimdType>&, - bit_or binary_op); + bit_or); template typename _SimdType::value_type reduce(const const_where_expression<_MaskType, _SimdType>&, - bit_xor binary_op); + bit_xor); template _Tp hmin(const simd<_Tp, _Abi>&); diff --git a/libcxx/include/future b/libcxx/include/future --- a/libcxx/include/future +++ b/libcxx/include/future @@ -525,12 +525,12 @@ #ifndef _LIBCPP_NO_EXCEPTIONS _LIBCPP_AVAILABILITY_FUTURE_ERROR #endif -void __throw_future_error(future_errc _Ev) +void __throw_future_error(future_errc __ev) { #ifndef _LIBCPP_NO_EXCEPTIONS - throw future_error(make_error_code(_Ev)); + throw future_error(make_error_code(__ev)); #else - ((void)_Ev); + ((void)__ev); _VSTD::abort(); #endif } @@ -1106,7 +1106,7 @@ struct __release_shared_count { - void operator()(__shared_count* p) {p->__release_shared();} + void operator()(__shared_count* __p) {__p->__release_shared();} }; template diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -582,9 +582,9 @@ _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value) : _Compare() {} _LIBCPP_INLINE_VISIBILITY - __map_value_compare(_Compare c) + __map_value_compare(_Compare __c) _NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value) - : _Compare(c) {} + : _Compare(__c) {} _LIBCPP_INLINE_VISIBILITY const _Compare& key_comp() const _NOEXCEPT {return *this;} _LIBCPP_INLINE_VISIBILITY @@ -627,9 +627,9 @@ _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value) : comp() {} _LIBCPP_INLINE_VISIBILITY - __map_value_compare(_Compare c) + __map_value_compare(_Compare __c) _NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value) - : comp(c) {} + : comp(__c) {} _LIBCPP_INLINE_VISIBILITY const _Compare& key_comp() const _NOEXCEPT {return comp;} @@ -990,7 +990,7 @@ protected: key_compare comp; - _LIBCPP_INLINE_VISIBILITY value_compare(key_compare c) : comp(c) {} + _LIBCPP_INLINE_VISIBILITY value_compare(key_compare __c) : comp(__c) {} public: _LIBCPP_INLINE_VISIBILITY bool operator()(const value_type& __x, const value_type& __y) const @@ -1767,7 +1767,7 @@ key_compare comp; _LIBCPP_INLINE_VISIBILITY - value_compare(key_compare c) : comp(c) {} + value_compare(key_compare __c) : comp(__c) {} public: _LIBCPP_INLINE_VISIBILITY bool operator()(const value_type& __x, const value_type& __y) const diff --git a/libcxx/include/memory b/libcxx/include/memory --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -1096,8 +1096,8 @@ _LIBCPP_CONSTEXPR explicit __builtin_new_deleter(size_t __size, size_t __align) : __size_(__size), __align_(__align) {} - void operator()(void* p) const _NOEXCEPT { - _VSTD::__libcpp_deallocate(p, __size_, __align_); + void operator()(void* __p) const _NOEXCEPT { + _VSTD::__libcpp_deallocate(__p, __size_, __align_); } private: diff --git a/libcxx/include/regex b/libcxx/include/regex --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -1330,9 +1330,9 @@ } inline _LIBCPP_INLINE_VISIBILITY -bool __is_07(unsigned char c) +bool __is_07(unsigned char __c) { - return (c & 0xF8u) == + return (__c & 0xF8u) == #if defined(__MVS__) && !defined(__NATIVE_ASCII_F) 0xF0; #else @@ -1341,9 +1341,9 @@ } inline _LIBCPP_INLINE_VISIBILITY -bool __is_89(unsigned char c) +bool __is_89(unsigned char __c) { - return (c & 0xFEu) == + return (__c & 0xFEu) == #if defined(__MVS__) && !defined(__NATIVE_ASCII_F) 0xF8; #else @@ -1352,12 +1352,12 @@ } inline _LIBCPP_INLINE_VISIBILITY -unsigned char __to_lower(unsigned char c) +unsigned char __to_lower(unsigned char __c) { #if defined(__MVS__) && !defined(__NATIVE_ASCII_F) return c & 0xBF; #else - return c | 0x20; + return __c | 0x20; #endif } @@ -2057,9 +2057,9 @@ template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -bool __is_eol(_CharT c) +bool __is_eol(_CharT __c) { - return c == '\r' || c == '\n'; + return __c == '\r' || __c == '\n'; } template @@ -2963,7 +2963,7 @@ __parse_awk_escape(_ForwardIterator __first, _ForwardIterator __last, basic_string<_CharT>* __str = nullptr); - bool __test_back_ref(_CharT c); + bool __test_back_ref(_CharT); _LIBCPP_INLINE_VISIBILITY void __push_l_anchor(); @@ -4782,9 +4782,9 @@ template bool -basic_regex<_CharT, _Traits>::__test_back_ref(_CharT c) +basic_regex<_CharT, _Traits>::__test_back_ref(_CharT __c) { - unsigned __val = __traits_.value(c, 10); + unsigned __val = __traits_.value(__c, 10); if (__val >= 1 && __val <= 9) { if (__val > mark_count()) diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator --- a/libcxx/include/scoped_allocator +++ b/libcxx/include/scoped_allocator @@ -219,10 +219,10 @@ is_constructible::value >::type> _LIBCPP_INLINE_VISIBILITY - __scoped_allocator_storage(_OuterA2&& __outerAlloc, - const _InnerAllocs& ...__innerAllocs) _NOEXCEPT - : outer_allocator_type(_VSTD::forward<_OuterA2>(__outerAlloc)), - __inner_(__innerAllocs...) {} + __scoped_allocator_storage(_OuterA2&& __outer_alloc, + const _InnerAllocs& ...__inner_allocs) _NOEXCEPT + : outer_allocator_type(_VSTD::forward<_OuterA2>(__outer_alloc)), + __inner_(__inner_allocs...) {} template ::value >::type> _LIBCPP_INLINE_VISIBILITY - __scoped_allocator_storage(_OuterA2&& __outerAlloc) _NOEXCEPT - : outer_allocator_type(_VSTD::forward<_OuterA2>(__outerAlloc)) {} + __scoped_allocator_storage(_OuterA2&& __outer_alloc) _NOEXCEPT + : outer_allocator_type(_VSTD::forward<_OuterA2>(__outer_alloc)) {} template ::value >::type> _LIBCPP_INLINE_VISIBILITY - scoped_allocator_adaptor(_OuterA2&& __outerAlloc, - const _InnerAllocs& ...__innerAllocs) _NOEXCEPT - : base(_VSTD::forward<_OuterA2>(__outerAlloc), __innerAllocs...) {} + scoped_allocator_adaptor(_OuterA2&& __outer_alloc, + const _InnerAllocs& ...__inner_allocs) _NOEXCEPT + : base(_VSTD::forward<_OuterA2>(__outer_alloc), __inner_allocs...) {} // scoped_allocator_adaptor(const scoped_allocator_adaptor& __other) = default; template - bool try_lock_for(const chrono::duration& rel_time); + bool try_lock_for(const chrono::duration& __rel_time); template - bool try_lock_until(const chrono::time_point& abs_time); + bool try_lock_until(const chrono::time_point& __abs_time); void unlock(); // Setters diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -324,8 +324,8 @@ ranges::sized_range<_Range> && is_same_v, _CharT> && !is_convertible_v<_Range, const _CharT*> && - (!requires(remove_cvref_t<_Range>& d) { - d.operator _VSTD::basic_string_view<_CharT, _Traits>(); + (!requires(remove_cvref_t<_Range>& __d) { + __d.operator _VSTD::basic_string_view<_CharT, _Traits>(); }) && (!requires { typename remove_reference_t<_Range>::traits_type; diff --git a/libcxx/include/system_error b/libcxx/include/system_error --- a/libcxx/include/system_error +++ b/libcxx/include/system_error @@ -236,7 +236,7 @@ : public error_category { public: - virtual string message(int ev) const; + virtual string message(int __ev) const; }; _LIBCPP_FUNC_VIS const error_category& generic_category() _NOEXCEPT; @@ -482,7 +482,7 @@ }; _LIBCPP_NORETURN _LIBCPP_FUNC_VIS -void __throw_system_error(int ev, const char* what_arg); +void __throw_system_error(int __ev, const char* __what_arg); _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/variant b/libcxx/include/variant --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -777,8 +777,8 @@ using __index_t = __variant_index_t; inline _LIBCPP_INLINE_VISIBILITY - explicit constexpr __base(__valueless_t tag) noexcept - : __data(tag), __index(__variant_npos<__index_t>) {} + explicit constexpr __base(__valueless_t __tag) noexcept + : __data(__tag), __index(__variant_npos<__index_t>) {} template inline _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -2184,8 +2184,8 @@ #if _LIBCPP_STD_VER > 11 template - _LIBCPP_INLINE_VISIBILITY iterator emplace(const_iterator position, _Args&&... __args) - { return insert ( position, value_type ( _VSTD::forward<_Args>(__args)... )); } + _LIBCPP_INLINE_VISIBILITY iterator emplace(const_iterator __position, _Args&&... __args) + { return insert ( __position, value_type ( _VSTD::forward<_Args>(__args)... )); } #endif iterator insert(const_iterator __position, const value_type& __x); diff --git a/libcxx/include/wchar.h b/libcxx/include/wchar.h --- a/libcxx/include/wchar.h +++ b/libcxx/include/wchar.h @@ -176,10 +176,10 @@ #if defined(__cplusplus) && (defined(_LIBCPP_MSVCRT_LIKE) || defined(__MVS__)) extern "C" { -size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src, - size_t nmc, size_t len, mbstate_t *__restrict ps); -size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src, - size_t nwc, size_t len, mbstate_t *__restrict ps); +size_t mbsnrtowcs(wchar_t *__restrict __dst, const char **__restrict __src, + size_t __nmc, size_t __len, mbstate_t *__restrict __ps); +size_t wcsnrtombs(char *__restrict __dst, const wchar_t **__restrict __src, + size_t __nwc, size_t __len, mbstate_t *__restrict __ps); } // extern "C" #endif // __cplusplus && (_LIBCPP_MSVCRT || __MVS__)