diff options
| author | David Blaikie <dblaikie@gmail.com> | 2013-02-21 20:58:29 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2013-02-21 20:58:29 +0000 |
| commit | 2a01f5d426c6bb0ef57c0a018942f6f6b179827a (patch) | |
| tree | 6484b1be92360933abdd7d03a8b1110d6c0aa76f /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | |
| parent | 23720cc66c3b639b2c4c1399e9f994dc14c5814b (diff) | |
| download | bcm5719-llvm-2a01f5d426c6bb0ef57c0a018942f6f6b179827a.tar.gz bcm5719-llvm-2a01f5d426c6bb0ef57c0a018942f6f6b179827a.zip | |
Replace CFGElement llvm::cast support to be well-defined.
See r175462 for another example/more details.
llvm-svn: 175796
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp index b93dfe1619d..5b3a5187596 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -554,7 +554,7 @@ void ExprEngine::VisitLogicalExpr(const BinaryOperator* B, ExplodedNode *Pred, // in SrcBlock is the value of the enclosing expression. // However, we still need to constrain that value to be 0 or 1. assert(!SrcBlock->empty()); - CFGStmt Elem = cast<CFGStmt>(*SrcBlock->rbegin()); + CFGStmt Elem = SrcBlock->rbegin()->castAs<CFGStmt>(); const Expr *RHS = cast<Expr>(Elem.getStmt()); SVal RHSVal = N->getState()->getSVal(RHS, Pred->getLocationContext()); @@ -659,8 +659,8 @@ void ExprEngine::VisitGuardedExpr(const Expr *Ex, for (CFGBlock::const_reverse_iterator I = SrcBlock->rbegin(), E = SrcBlock->rend(); I != E; ++I) { CFGElement CE = *I; - if (CFGStmt *CS = dyn_cast<CFGStmt>(&CE)) { - const Expr *ValEx = cast<Expr>(CS->getStmt()); + if (CFGStmt CS = CE.getAs<CFGStmt>()) { + const Expr *ValEx = cast<Expr>(CS.getStmt()); hasValue = true; V = state->getSVal(ValEx, LCtx); break; |

