[llvm] r215888 - Silencing an MSVC warning about loop variable conflicting with a variable from an outer scope. NFC.

David Blaikie dblaikie at gmail.com
Mon Aug 18 07:18:41 PDT 2014


On Mon, Aug 18, 2014 at 4:51 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
> Author: aaronballman
> Date: Mon Aug 18 06:51:41 2014
> New Revision: 215888
>
> URL: http://llvm.org/viewvc/llvm-project?rev=215888&view=rev
> Log:
> Silencing an MSVC warning about loop variable conflicting with a variable from an outer scope. NFC.

Sorry if this gets a bit repetitious (I ask this about every non-clang
warning we make code fixes for) - should we just disable this MSVC
warning in LLVM's build system?

Either that, or we could turn on Clang's -Wshadow to catch these in
clang builds too, if it's a thing we want to catch/fix.

>
> Modified:
>     llvm/trunk/lib/Target/R600/SIISelLowering.cpp
>
> Modified: llvm/trunk/lib/Target/R600/SIISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIISelLowering.cpp?rev=215888&r1=215887&r2=215888&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/R600/SIISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/R600/SIISelLowering.cpp Mon Aug 18 06:51:41 2014
> @@ -1410,7 +1410,7 @@ SDValue SITargetLowering::PerformDAGComb
>        SDValue NewPtr = performSHLPtrCombine(Ptr.getNode(), AS, DCI);
>        if (NewPtr) {
>          SmallVector<SDValue, 8> NewOps;
> -        for (unsigned I = 0, N = MemNode->getNumOperands(); I != N; ++I)
> +        for (unsigned I = 0, E = MemNode->getNumOperands(); I != E; ++I)
>            NewOps.push_back(MemNode->getOperand(I));
>
>          NewOps[N->getOpcode() == ISD::STORE ? 2 : 1] = NewPtr;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list