summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-08 15:50:43 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-08 15:50:43 +0000
commit6336f296694bc233e899785973f58d4d608b39e8 (patch)
tree7e57b8e6e842ec076e10a18d69398aa4d406b782 /clang/lib/AST/ExprCXX.cpp
parent2bb8b26aa836aea1f87ef5469aed325c7f202d37 (diff)
downloadbcm5719-llvm-6336f296694bc233e899785973f58d4d608b39e8.tar.gz
bcm5719-llvm-6336f296694bc233e899785973f58d4d608b39e8.zip
Teach CXXUnresolvedConstructExpr when it should be an
lvalue/xvalue/rvalue, rather than just (incorrectly) assuming it's an lvalue. Fixes PR10285 / <rdar://problem/9743926>. llvm-svn: 134700
Diffstat (limited to 'clang/lib/AST/ExprCXX.cpp')
-rw-r--r--clang/lib/AST/ExprCXX.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp
index 32209f6be6a..f92afffb585 100644
--- a/clang/lib/AST/ExprCXX.cpp
+++ b/clang/lib/AST/ExprCXX.cpp
@@ -725,7 +725,10 @@ CXXUnresolvedConstructExpr::CXXUnresolvedConstructExpr(TypeSourceInfo *Type,
SourceLocation RParenLoc)
: Expr(CXXUnresolvedConstructExprClass,
Type->getType().getNonReferenceType(),
- VK_LValue, OK_Ordinary,
+ (Type->getType()->isLValueReferenceType() ? VK_LValue
+ :Type->getType()->isRValueReferenceType()? VK_XValue
+ :VK_RValue),
+ OK_Ordinary,
Type->getType()->isDependentType(), true, true,
Type->getType()->containsUnexpandedParameterPack()),
Type(Type),
OpenPOWER on IntegriCloud