[PATCH] Refactor: Simplify boolean expressions in llvm Support

Richard legalize at xmission.com
Sun Mar 22 13:06:19 PDT 2015


Hi alexfh, rafael, bkramer, ddunbar, Bigcheese, chandlerc,

Simplify boolean expressions using `true` and `false` with `clang-tidy`

http://reviews.llvm.org/D8526

Files:
  lib/Support/APFloat.cpp

Index: lib/Support/APFloat.cpp
===================================================================
--- lib/Support/APFloat.cpp
+++ lib/Support/APFloat.cpp
@@ -1430,7 +1430,7 @@
 
   /* Determine if the operation on the absolute values is effectively
      an addition or subtraction.  */
-  subtract ^= (sign ^ rhs.sign) ? true : false;
+  subtract ^= (sign ^ rhs.sign) != 0;
 
   /* Are we bigger exponent-wise than the RHS?  */
   bits = exponent - rhs.exponent;

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8526.22434.patch
Type: text/x-patch
Size: 465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150322/f7c723b4/attachment.bin>


More information about the llvm-commits mailing list