Skip to content
This repository was archived by the owner on Mar 30, 2021. It is now read-only.

Commit a2e66ca

Browse files
author
Balogh, Ádám
authored
Merge pull request #696 from baloghadamsoftware/IteratorCheckerFix
[Analyzer] Iterator Checkers - Crash Fix
2 parents 643c9c2 + d75eca2 commit a2e66ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/StaticAnalyzer/Checkers/IteratorChecker.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,6 +2121,9 @@ ProgramStateRef relateIteratorPositions(ProgramStateRef State,
21212121
"Symbol comparison must be a `DefinedSVal`");
21222122

21232123
auto NewState = State->assume(comparison.castAs<DefinedSVal>(), Equal);
2124+
if (!NewState)
2125+
return nullptr;
2126+
21242127
if (const auto CompSym = comparison.getAsSymbol()) {
21252128
assert(isa<SymIntExpr>(CompSym) &&
21262129
"Symbol comparison must be a `SymIntExpr`");

0 commit comments

Comments
 (0)