[PATCH] D17375: Add parentheses around arithmetic in operand of '|' in llvm-dwp.cpp.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 18 08:39:21 PST 2016


Thanks all! Which compiler flagged this? Wonder if/why Clang didn't flag it
for me?

On Thu, Feb 18, 2016 at 5:27 AM, Phabricator via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> This revision was automatically updated to reflect the committed changes.
> Closed by commit rL261207: Add parentheses around arithmetic in operand of
> '|'. (authored by d0k).
>
> Changed prior to commit:
>   http://reviews.llvm.org/D17375?vs=48301&id=48302#toc
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D17375
>
> Files:
>   llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
>
> Index: llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
> ===================================================================
> --- llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
> +++ llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
> @@ -238,7 +238,7 @@
>      while (Buckets[H]) {
>        assert(S != IndexEntries[Buckets[H] - 1].Signature &&
>               "Duplicate type unit");
> -      H = (H + ((S >> 32) & Mask) | 1) % Buckets.size();
> +      H = (H + (((S >> 32) & Mask) | 1)) % Buckets.size();
>      }
>      Buckets[H] = i + 1;
>    }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160218/da39e221/attachment.html>


More information about the cfe-commits mailing list