aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.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/SemaTemplate.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/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index c654e008b5..4cb9433589 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -2909,8 +2909,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
Arg, Converted);
if (IsQualificationConversion(ArgType, ParamType.getNonReferenceType())) {
- ImpCastExprToType(Arg, ParamType, CastExpr::CK_NoOp,
- Arg->isLvalue(Context) == Expr::LV_Valid);
+ ImpCastExprToType(Arg, ParamType, CastExpr::CK_NoOp, CastCategory(Arg));
} else if (!Context.hasSameUnqualifiedType(ArgType,
ParamType.getNonReferenceType())) {
// We can't perform this conversion.
@@ -2973,8 +2972,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
if (Context.hasSameUnqualifiedType(ParamType, ArgType)) {
// Types match exactly: nothing more to do here.
} else if (IsQualificationConversion(ArgType, ParamType)) {
- ImpCastExprToType(Arg, ParamType, CastExpr::CK_NoOp,
- Arg->isLvalue(Context) == Expr::LV_Valid);
+ ImpCastExprToType(Arg, ParamType, CastExpr::CK_NoOp, CastCategory(Arg));
} else {
// We can't perform this conversion.
Diag(Arg->getSourceRange().getBegin(),