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/Sema/SemaChecking.cpp | |
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/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index a8782c16e0b..e5e80db2bef 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -783,16 +783,10 @@ static DeclRefExpr* EvalAddr(Expr *E) { // For casts, we need to handle conversions from arrays to // pointer values, and pointer-to-pointer conversions. - case Stmt::CastExprClass: + case Stmt::ExplicitCastExprClass: case Stmt::ImplicitCastExprClass: { - Expr* SubExpr; - - if (ImplicitCastExpr *IE = dyn_cast<ImplicitCastExpr>(E)) - SubExpr = IE->getSubExpr(); - else - SubExpr = cast<CastExpr>(E)->getSubExpr(); - + Expr* SubExpr = cast<CastExpr>(E)->getSubExpr(); QualType T = SubExpr->getType(); if (T->isPointerType() || T->isObjCQualifiedIdType()) |