[PATCH] Refactor: Simplify boolean expresssions in lib/Lex

David Blaikie dblaikie at gmail.com
Mon Mar 23 12:42:14 PDT 2015


Looks good - committed in r232999

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

> Hi alexfh, doug.gregor, akyrtzi, krememek, rsmith,
>
> Simplify boolean expressions using `true` and `false` with `clang-tidy`
>
> http://reviews.llvm.org/D8531
>
> Files:
>   lib/Lex/LiteralSupport.cpp
>
> Index: lib/Lex/LiteralSupport.cpp
> ===================================================================
> --- lib/Lex/LiteralSupport.cpp
> +++ lib/Lex/LiteralSupport.cpp
> @@ -144,7 +144,7 @@
>        int CharVal = llvm::hexDigitValue(ThisTokBuf[0]);
>        if (CharVal == -1) break;
>        // About to shift out a digit?
> -      Overflow |= (ResultChar & 0xF0000000) ? true : false;
> +      Overflow |= (ResultChar & 0xF0000000);
>        ResultChar <<= 4;
>        ResultChar |= CharVal;
>      }
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150323/038620d6/attachment.html>


More information about the cfe-commits mailing list