[PATCH] D43277: limits: Use `false` instead of `type(0)`.

2018-02-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment.

In https://reviews.llvm.org/D43277#1009659, @brucem wrote:

> Without this, anyone using `clang-tidy` with this check gets 6 system header 
> warnings whenever they transitively have included `limits`.


Only if `-system-headers` is passed to clang-tidy, or if those libc++ headers 
are included as normal includes (`-I`), and not as system includes (`-isystem`).


Repository:
  rCXX libc++

https://reviews.llvm.org/D43277



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D43277: limits: Use `false` instead of `type(0)`.

2018-02-15 Thread Bruce Mitchener via Phabricator via cfe-commits
brucem added a comment.
Herald added a subscriber: christof.

Without this, anyone using `clang-tidy` with this check gets 6 system header 
warnings whenever they transitively have included `limits`.


Repository:
  rCXX libc++

https://reviews.llvm.org/D43277



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D43277: limits: Use `false` instead of `type(0)`.

2018-02-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment.

I see no benefit to this change.  `bool(0)` is `false`.


Repository:
  rCXX libc++

https://reviews.llvm.org/D43277



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D43277: limits: Use `false` instead of `type(0)`.

2018-02-13 Thread Bruce Mitchener via Phabricator via cfe-commits
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