r254704 - Fix an unused variable warning in released builds. While there use 'auto' to simplify code.

Devin Coughlin via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 3 21:38:43 PST 2015


Thanks!
Devin

> On Dec 3, 2015, at 9:27 PM, Craig Topper via cfe-commits <cfe-commits at lists.llvm.org> wrote:
> 
> Author: ctopper
> Date: Thu Dec  3 23:27:29 2015
> New Revision: 254704
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=254704&view=rev
> Log:
> Fix an unused variable warning in released builds. While there use 'auto' to simplify code.
> 
> Modified:
>    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
> 
> Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h?rev=254704&r1=254703&r2=254704&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h (original)
> +++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h Thu Dec  3 23:27:29 2015
> @@ -521,9 +521,8 @@ public:
>     const BlockDataRegion *BR = getBlockRegion();
>     assert(BR && "Block converted from lambda must have a block region");
> 
> -    BlockDataRegion::referenced_vars_iterator I = BR->referenced_vars_begin(),
> -    E = BR->referenced_vars_end();
> -    assert(I != E);
> +    auto I = BR->referenced_vars_begin();
> +    assert(I != BR->referenced_vars_end());
> 
>     return I.getCapturedRegion();
>   }
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list