r358971 - [Analyzer] Second fix for last commit for IteratorChecker
Adam Balogh via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 23 04:18:51 PDT 2019
Author: baloghadamsoftware
Date: Tue Apr 23 04:18:50 2019
New Revision: 358971
URL: http://llvm.org/viewvc/llvm-project?rev=358971&view=rev
Log:
[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.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp?rev=358971&r1=358970&r2=358971&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp Tue Apr 23 04:18:50 2019
@@ -825,7 +825,7 @@ void IteratorChecker::handleComparison(C
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);
}
More information about the cfe-commits
mailing list