From 37a9df4e20688681604536b1570da7426da4ceed Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 4 Dec 2015 05:27:29 +0000 Subject: [PATCH] Fix an unused variable warning in released builds. While there use 'auto' to simplify code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254704 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h index 2e9add60f3..8d1e4b9c5d 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h @@ -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(); } -- 2.40.0