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 | fdf6a279c9a75c778eba382d9a156697092982a1 (patch) | |
tree | e67bc01445260b8cd78ddfd21f1a9f4fe059ac79 /lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | |
parent | 05f8ff134d5f270bd7bfe4aaef491bd3febddea1 (diff) |
Replace CFGElement llvm::cast support to be well-defined.
See r175462 for another example/more details.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngineCXX.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp b/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp index d7cb5d1878..43184cfd82 100644 --- a/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp +++ b/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()); |