<div dir="ltr">Fixed in r273902. Thanks for pinging this!<div><br></div><div>(Also, in the future, if you could add reviewers/the patch author to the CC line for things like this, that would be really helpful. Many of us have lots of email filters set up, so being cc'ed makes a difference. :) )<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 25, 2016 at 12:43 PM, Hans-Bernhard Bröker <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
and please excuse my barging in like this.  I think one detail of the recent patch r273636 is wrong.  The shift operation in<br>
<br>
static StratifiedAttrs argNumberToAttr(unsigned ArgNum) {<br>
  if (ArgNum >= AttrMaxNumArgs)<br>
    return AttrUnknown;<br>
  return StratifiedAttrs(1 << (ArgNum + AttrFirstArgIndex));<br>
}<br>
<br>
is fishy, and MSVC rightly warns about it:<br>
<br>
 [...]\llvm\lib\Analysis\CFLAliasAnalysis.cpp(765): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)<br>
<br>
The problem is that the literal '1', and thus the result of the shift, is a plain signed int, whereas the constructor of StatifiedAttrs() takes an argument of unsigned long long.  On 64-bit Windows, these are 32-bit signed and 64-bit unsigned, respectively, hence the warning.<br>
<br>
Shifts like that should always be done entirely in the realm of unsigned numbers, i.e. that should be `1U' instead of `1'.  And if the result is going to end up being implicitly converted to long long, it's best to write it as that directly:<br>
<br>
  return StratifiedAttrs(1ULL << (ArgNum + AttrFirstArgIndex));<br>
<br>
Hans-Bernhard Bröker<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div></div>