diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-18 23:01:59 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-18 23:01:59 +0000 |
| commit | 3bab3d21f92eca5c1caa83b2b4806d4bcffe5d3d (patch) | |
| tree | 1f2d6ae968efc4a2a581d03beee00f8bedf4eaf8 /clang/lib/Analysis | |
| parent | 3f4c68b78efe4c0b540e05d9346c5f415b2c368b (diff) | |
| download | bcm5719-llvm-3bab3d21f92eca5c1caa83b2b4806d4bcffe5d3d.tar.gz bcm5719-llvm-3bab3d21f92eca5c1caa83b2b4806d4bcffe5d3d.zip | |
Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):
Expr
-> CastExpr
-> ExplicitCastExpr
-> ImplicitCastExpr
llvm-svn: 54955
Diffstat (limited to 'clang/lib/Analysis')
| -rw-r--r-- | clang/lib/Analysis/Environment.cpp | 15 | ||||
| -rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 11 |
2 files changed, 5 insertions, 21 deletions
diff --git a/clang/lib/Analysis/Environment.cpp b/clang/lib/Analysis/Environment.cpp index dd5caef7f08..7f6fbd30513 100644 --- a/clang/lib/Analysis/Environment.cpp +++ b/clang/lib/Analysis/Environment.cpp @@ -47,19 +47,8 @@ RVal Environment::GetRVal(Expr* E, BasicValueFactory& BasicVals) const { // are no-ops. We blast through these to get the descendant // subexpression that has a value. - case Stmt::ImplicitCastExprClass: { - ImplicitCastExpr* C = cast<ImplicitCastExpr>(E); - QualType CT = C->getType(); - - if (CT->isVoidType()) - return UnknownVal(); - - QualType ST = C->getSubExpr()->getType(); - - break; - } - - case Stmt::CastExprClass: { + case Stmt::ImplicitCastExprClass: + case Stmt::ExplicitCastExprClass: { CastExpr* C = cast<CastExpr>(E); QualType CT = C->getType(); QualType ST = C->getSubExpr()->getType(); diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 896f473df8a..18c5a5825ec 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -356,12 +356,6 @@ void GRExprEngine::Visit(Stmt* S, NodeTy* Pred, NodeSet& Dst) { break; } - case Stmt::CastExprClass: { - CastExpr* C = cast<CastExpr>(S); - VisitCast(C, C->getSubExpr(), Pred, Dst); - break; - } - // FIXME: ChooseExpr is really a constant. We need to fix // the CFG do not model them as explicit control-flow. @@ -389,8 +383,9 @@ void GRExprEngine::Visit(Stmt* S, NodeTy* Pred, NodeSet& Dst) { VisitDeclStmt(cast<DeclStmt>(S), Pred, Dst); break; - case Stmt::ImplicitCastExprClass: { - ImplicitCastExpr* C = cast<ImplicitCastExpr>(S); + case Stmt::ImplicitCastExprClass: + case Stmt::ExplicitCastExprClass: { + CastExpr* C = cast<CastExpr>(S); VisitCast(C, C->getSubExpr(), Pred, Dst); break; } |

