<div dir="rtl"><div dir="ltr">I'm for catching this with all compilers, shadowing is source of subtle bugs.</div><div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote"><div dir="ltr">2014-08-18 17:18 GMT+03:00 David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

On Mon, Aug 18, 2014 at 4:51 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
> Author: aaronballman<br>
> Date: Mon Aug 18 06:51:41 2014<br>
> New Revision: 215888<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=215888&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=215888&view=rev</a><br>
> Log:<br>
> Silencing an MSVC warning about loop variable conflicting with a variable from an outer scope. NFC.<br>
<br>
Sorry if this gets a bit repetitious (I ask this about every non-clang<br>
warning we make code fixes for) - should we just disable this MSVC<br>
warning in LLVM's build system?<br>
<br>
Either that, or we could turn on Clang's -Wshadow to catch these in<br>
clang builds too, if it's a thing we want to catch/fix.<br>
<br>
><br>
> Modified:<br>
>     llvm/trunk/lib/Target/R600/SIISelLowering.cpp<br>
><br>
> Modified: llvm/trunk/lib/Target/R600/SIISelLowering.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIISelLowering.cpp?rev=215888&r1=215887&r2=215888&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIISelLowering.cpp?rev=215888&r1=215887&r2=215888&view=diff</a><br>


> ==============================================================================<br>
> --- llvm/trunk/lib/Target/R600/SIISelLowering.cpp (original)<br>
> +++ llvm/trunk/lib/Target/R600/SIISelLowering.cpp Mon Aug 18 06:51:41 2014<br>
> @@ -1410,7 +1410,7 @@ SDValue SITargetLowering::PerformDAGComb<br>
>        SDValue NewPtr = performSHLPtrCombine(Ptr.getNode(), AS, DCI);<br>
>        if (NewPtr) {<br>
>          SmallVector<SDValue, 8> NewOps;<br>
> -        for (unsigned I = 0, N = MemNode->getNumOperands(); I != N; ++I)<br>
> +        for (unsigned I = 0, E = MemNode->getNumOperands(); I != E; ++I)<br>
>            NewOps.push_back(MemNode->getOperand(I));<br>
><br>
>          NewOps[N->getOpcode() == ISD::STORE ? 2 : 1] = NewPtr;<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>