From: Adam Balogh Date: Tue, 23 Apr 2019 11:18:50 +0000 (+0000) Subject: [Analyzer] Second fix for last commit for IteratorChecker X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2e2e20de36871b281439793c78aabd2bb8eeff9;p=platform%2Fupstream%2Fllvm.git [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. llvm-svn: 358971 --- diff --git a/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp index e35bc27..cfa4087 100644 --- a/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp +++ b/clang/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); }