diff options
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index 5d5b9b70cb..eb83e202b7 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -248,8 +248,6 @@ void ExprEngine::processCFGElement(const CFGElement E, ExplodedNode *Pred, currBldrCtx = Ctx; switch (E.getKind()) { - case CFGElement::Invalid: - llvm_unreachable("Unexpected CFGElement kind."); case CFGElement::Statement: ProcessStmt(const_cast<Stmt*>(E.castAs<CFGStmt>().getStmt()), Pred); return; @@ -1226,10 +1224,10 @@ static const Stmt *ResolveCondition(const Stmt *Condition, CFGBlock::const_reverse_iterator I = B->rbegin(), E = B->rend(); for (; I != E; ++I) { CFGElement Elem = *I; - CFGStmt CS = Elem.getAs<CFGStmt>(); + Optional<CFGStmt> CS = Elem.getAs<CFGStmt>(); if (!CS) continue; - if (CS.getStmt() != Condition) + if (CS->getStmt() != Condition) break; return Condition; } |