diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-07-20 04:20:21 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-07-20 04:20:21 +0000 |
commit | 906082edf2aea1c6de2926f93a8d7121e49d2a54 (patch) | |
tree | 40ad6a9e39aa0c1554391f03c4dd14cab9e668c1 /lib/AST/Expr.cpp | |
parent | 0b42659e76ec32cee3f59bc206e93b4c917e9df5 (diff) |
Update ImplicitCastExpr to be able to represent an XValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 6524a312dc..724c65aa31 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -1508,7 +1508,8 @@ FieldDecl *Expr::getBitField() { Expr *E = this->IgnoreParens(); while (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) { - if (ICE->isLvalueCast() && ICE->getCastKind() == CastExpr::CK_NoOp) + if (ICE->getCategory() != ImplicitCastExpr::RValue && + ICE->getCastKind() == CastExpr::CK_NoOp) E = ICE->getSubExpr()->IgnoreParens(); else break; @@ -1530,7 +1531,8 @@ bool Expr::refersToVectorElement() const { const Expr *E = this->IgnoreParens(); while (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) { - if (ICE->isLvalueCast() && ICE->getCastKind() == CastExpr::CK_NoOp) + if (ICE->getCategory() != ImplicitCastExpr::RValue && + ICE->getCastKind() == CastExpr::CK_NoOp) E = ICE->getSubExpr()->IgnoreParens(); else break; |