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 | 0835a3cdeefe714b4959d31127ea155e56393125 (patch) | |
tree | b5ae4b640f3664473f10df485dab4015331c7df8 /lib/Sema/SemaChecking.cpp | |
parent | 4f3278fe397250b75ba5a0b5a6cf98309bd2ad2c (diff) |
Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):
Expr
-> CastExpr
-> ExplicitCastExpr
-> ImplicitCastExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index a8782c16e0..e5e80db2be 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/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()) |