summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-02-21 20:58:29 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-02-21 20:58:29 +0000
commit2a01f5d426c6bb0ef57c0a018942f6f6b179827a (patch)
tree6484b1be92360933abdd7d03a8b1110d6c0aa76f /clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
parent23720cc66c3b639b2c4c1399e9f994dc14c5814b (diff)
downloadbcm5719-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/ExprEngineCXX.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
index d7cb5d18786..43184cfd821 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
@@ -96,8 +96,8 @@ void ExprEngine::VisitCXXConstructExpr(const CXXConstructExpr *CE,
CFGElement Next = (*B)[currStmtIdx+1];
// Is this a constructor for a local variable?
- if (const CFGStmt *StmtElem = dyn_cast<CFGStmt>(&Next)) {
- if (const DeclStmt *DS = dyn_cast<DeclStmt>(StmtElem->getStmt())) {
+ if (CFGStmt StmtElem = Next.getAs<CFGStmt>()) {
+ if (const DeclStmt *DS = dyn_cast<DeclStmt>(StmtElem.getStmt())) {
if (const VarDecl *Var = dyn_cast<VarDecl>(DS->getSingleDecl())) {
if (Var->getInit()->IgnoreImplicit() == CE) {
QualType Ty = Var->getType();
@@ -119,8 +119,8 @@ void ExprEngine::VisitCXXConstructExpr(const CXXConstructExpr *CE,
}
// Is this a constructor for a member?
- if (const CFGInitializer *InitElem = dyn_cast<CFGInitializer>(&Next)) {
- const CXXCtorInitializer *Init = InitElem->getInitializer();
+ if (CFGInitializer InitElem = Next.getAs<CFGInitializer>()) {
+ const CXXCtorInitializer *Init = InitElem.getInitializer();
assert(Init->isAnyMemberInitializer());
const CXXMethodDecl *CurCtor = cast<CXXMethodDecl>(LCtx->getDecl());
OpenPOWER on IntegriCloud