summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-03-23 19:45:40 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-03-23 19:45:40 +0000
commit4f75c097b05b8eaf704ed679b18d5a54f2e63476 (patch)
tree8f3c20d2a8471682027531b7ff4abacc61a8df9f /llvm/lib/Support/APFloat.cpp
parent60f0aa8a42e1414af752cba5531254d449d238c0 (diff)
downloadbcm5719-llvm-4f75c097b05b8eaf704ed679b18d5a54f2e63476.tar.gz
bcm5719-llvm-4f75c097b05b8eaf704ed679b18d5a54f2e63476.zip
Refactor: Simplify boolean expressions in llvm Support
Simplify boolean expressions using `true` and `false` with `clang-tidy` Patch by Richard Thomson - I dropped the parens and != 0 test, for consistency with other patches/tests like this, but I'm open to the notion that we should add the explicit non-zero test in all these sort of cases (non-bool assigned to a bool). Differential Revision: http://reviews.llvm.org/D8526 llvm-svn: 233004
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r--llvm/lib/Support/APFloat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index 535e80d7639..f3f01987f8e 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -1430,7 +1430,7 @@ APFloat::addOrSubtractSignificand(const APFloat &rhs, bool subtract)
/* Determine if the operation on the absolute values is effectively
an addition or subtraction. */
- subtract ^= (sign ^ rhs.sign) ? true : false;
+ subtract ^= sign ^ rhs.sign;
/* Are we bigger exponent-wise than the RHS? */
bits = exponent - rhs.exponent;
OpenPOWER on IntegriCloud