[libcxx-commits] [PATCH] D67900: [libc++] Use builtin type traits whenever possible

Tiancong Wang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 31 14:53:13 PDT 2020


tcwang added a comment.
Herald added a subscriber: broadwaylamb.

This patch has caused a regression on Chrome OS (https://bugs.chromium.org/p/chromium/issues/detail?id=1065276).

Some errors like:
In file included from ../../../libchrome-576279/platform2/libchrome/mojo/core/ports/event.cc:5:
libchrome-576279-r9: In file included from ../../../libchrome-576279/platform2/libchrome/mojo/core/ports/event.h:10:
libchrome-576279-r9: In file included from /usr/bin/../include/c++/v1/vector:274:
libchrome-576279-r9: In file included from /usr/bin/../include/c++/v1/__bit_reference:14:
libchrome-576279-r9: In file included from /usr/bin/../include/c++/v1/bit:57:
libchrome-576279-r9: /usr/bin/../include/c++/v1/limits:190:59: error: invalid operands to binary expression ('__float128' and 'int')
libchrome-576279-r9:     static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits);
libchrome-576279-r9:                                                    ~~~~~~ ^  ~~~~~~~~
libchrome-576279-r9: /usr/bin/../include/c++/v1/limits:211:49: note: in instantiation of template class 'std::__1::__libcpp_compute_min<__float128, 127, true>' requested here
libchrome-576279-r9:     static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
libchrome-576279-r9:                                                 ^
libchrome-576279-r9: /usr/bin/../include/c++/v1/limits:444:15: note: in instantiation of template class 'std::__1::__libcpp_numeric_limits<__float128, true>' requested here
libchrome-576279-r9:     : private __libcpp_numeric_limits<typename remove_cv<_Tp>::type>
libchrome-576279-r9:               ^
libchrome-576279-r9: ../../../libchrome-576279/platform2/libchrome/base/numerics/safe_conversions_impl.h:29:39: note: in instantiation of template class 'std::__1::numeric_limits<__float128>' requested here
libchrome-576279-r9:                                ? std::numeric_limits<NumericType>::max_exponent
libchrome-576279-r9:                                       ^
libchrome-576279-r9: ../../../libchrome-576279/platform2/libchrome/base/numerics/safe_conversions_impl.h:175:7: note: in instantiation of template class 'base::internal::MaxExponent<__float128>' requested here
libchrome-576279-r9:       MaxExponent<Dst>::value > MaxExponent<Src>::value
libchrome-576279-r9:       ^
libchrome-576279-r9: ../../../libchrome-576279/platform2/libchrome/base/numerics/safe_conversions.h:240:29: note: in instantiation of template class 'base::internal::StaticDstRangeRelationToSrcRange<__float128, unsigned long, base::internal::INTEGER_REPRESENTATION_SIGNED, base::internal::INTEGER_REPRESENTATION_UNSIGNED>' requested here
libchrome-576279-r9:   static const bool value = StaticDstRangeRelationToSrcRange<Dst, Src>::value ==
libchrome-576279-r9:                             ^
libchrome-576279-r9: ../../../libchrome-576279/platform2/libchrome/base/numerics/safe_conversions.h:286:17: note: in instantiation of template class 'base::internal::IsNumericRangeContained<__float128, unsigned long, void>' requested here
libchrome-576279-r9:                 IsNumericRangeContained<Dst, T>::value>::type* = nullptr>
libchrome-576279-r9:                 ^
libchrome-576279-r9: ../../../libchrome-576279/platform2/libchrome/base/numerics/safe_conversions.h:287:13: note: while substituting prior template arguments into non-type template parameter [with Dst = __float128]
libchrome-576279-r9:   constexpr operator Dst() const {
libchrome-576279-r9:             ^~~~~~~~~~~~~~~~~~~~~~
libchrome-576279-r9: ../../../libchrome-576279/platform2/libchrome/mojo/core/ports/event.cc:171:55: note: while substituting deduced template arguments into function template 'operator type-parameter-0-0' [with Dst = __float128, $1 = (no value)]
libchrome-576279-r9:   if (!total_size.IsValid() || num_bytes < total_size.ValueOrDie())


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67900/new/

https://reviews.llvm.org/D67900





More information about the libcxx-commits mailing list