From 6a1e1a19cb61ff9bcaa3328f5742d135bbd82a2f Mon Sep 17 00:00:00 2001 From: Adam Balogh Date: Tue, 23 Apr 2019 11:18:50 +0000 Subject: [PATCH] [Analyzer] Second fix for last commit for IteratorChecker A variable was redeclared instead of assigned in an internal block, leaving the original uninitialized. This is fixed now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358971 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Checkers/IteratorChecker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp b/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp index e35bc2768a..cfa408720c 100644 --- a/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp @@ -825,7 +825,7 @@ void IteratorChecker::handleComparison(CheckerContext &C, const Expr *CE, SymbolRef Sym; if (!LPos || !RPos) { auto &SymMgr = C.getSymbolManager(); - auto Sym = SymMgr.conjureSymbol(CE, C.getLocationContext(), + Sym = SymMgr.conjureSymbol(CE, C.getLocationContext(), C.getASTContext().LongTy, C.blockCount()); State = assumeNoOverflow(State, Sym, 4); } -- 2.50.1