brucem created this revision.
brucem added reviewers: mclow.lists, EricWF.
This fixes warnings when using clang-tidy and the
`modernize-use-bool-literals` check.
Repository:
rCXX libc++
https://reviews.llvm.org/D43277
Files:
include/limits
Index: include/limits
===
--- include/limits
+++ include/limits
@@ -269,8 +269,8 @@
static _LIBCPP_CONSTEXPR const bool is_integer = true;
static _LIBCPP_CONSTEXPR const bool is_exact = true;
static _LIBCPP_CONSTEXPR const int radix = 2;
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon()
_NOEXCEPT {return type(0);}
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error()
_NOEXCEPT {return type(0);}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon()
_NOEXCEPT {return false;}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error()
_NOEXCEPT {return false;}
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
@@ -282,10 +282,10 @@
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm =
denorm_absent;
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity()
_NOEXCEPT {return type(0);}
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN()
_NOEXCEPT {return type(0);}
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN()
_NOEXCEPT {return type(0);}
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min()
_NOEXCEPT {return type(0);}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity()
_NOEXCEPT {return false;}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN()
_NOEXCEPT {return false;}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN()
_NOEXCEPT {return false;}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min()
_NOEXCEPT {return false;}
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
Index: include/limits
===
--- include/limits
+++ include/limits
@@ -269,8 +269,8 @@
static _LIBCPP_CONSTEXPR const bool is_integer = true;
static _LIBCPP_CONSTEXPR const bool is_exact = true;
static _LIBCPP_CONSTEXPR const int radix = 2;
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return false;}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return false;}
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
@@ -282,10 +282,10 @@
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
-_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return false;}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return false;}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return false;}
+_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return false;}
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits