aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-07-20 04:20:21 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-07-20 04:20:21 +0000
commit906082edf2aea1c6de2926f93a8d7121e49d2a54 (patch)
tree40ad6a9e39aa0c1554391f03c4dd14cab9e668c1 /lib/Sema/SemaOverload.cpp
parent0b42659e76ec32cee3f59bc206e93b4c917e9df5 (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/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index c4ab9061b4..9f02dae9f8 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -3042,7 +3042,8 @@ Sema::PerformObjectArgumentInitialization(Expr *&From,
if (!Context.hasSameType(From->getType(), DestType))
ImpCastExprToType(From, DestType, CastExpr::CK_NoOp,
- /*isLvalue=*/!From->getType()->isPointerType());
+ From->getType()->isPointerType() ?
+ ImplicitCastExpr::RValue : ImplicitCastExpr::LValue);
return false;
}
@@ -3721,7 +3722,8 @@ Sema::AddConversionCandidate(CXXConversionDecl *Conversion,
From->getLocStart());
ImplicitCastExpr ConversionFn(Context.getPointerType(Conversion->getType()),
CastExpr::CK_FunctionToPointerDecay,
- &ConversionRef, CXXBaseSpecifierArray(), false);
+ &ConversionRef, CXXBaseSpecifierArray(),
+ ImplicitCastExpr::RValue);
// Note that it is safe to allocate CallExpr on the stack here because
// there are 0 arguments (i.e., nothing is allocated using ASTContext's
@@ -7632,7 +7634,7 @@ Expr *Sema::FixOverloadedFunctionReference(Expr *E, DeclAccessPair Found,
return new (Context) ImplicitCastExpr(ICE->getType(),
ICE->getCastKind(),
SubExpr, CXXBaseSpecifierArray(),
- ICE->isLvalueCast());
+ ICE->getCategory());
}
if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(E)) {