[PATCH] Refactor: Simplify boolean expressions in llvm Support

David Blaikie dblaikie at gmail.com
Mon Mar 23 12:48:19 PDT 2015


Looks good - committed in r233004

On Sun, Mar 22, 2015 at 1:06 PM, Richard <legalize at xmission.com> wrote:

> 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/
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150323/942d32d9/attachment.html>


More information about the llvm-commits mailing list