aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-08-30 00:57:29 +0000
committerJohn McCall <rjmccall@apple.com>2011-08-30 00:57:29 +0000
commit2148011bffc011f8e5f5b6dc1e312fa4afbc10a9 (patch)
tree0ebdb72742b2fda4b6b07cee2a3390729a2b103c /lib/Sema/SemaOverload.cpp
parentdad879a783f7cf055dd532883cd5efe12bcfd926 (diff)
Be sure to emit lvalue-to-rvalue casts for loads from x-values.
Doing this happens to disrupt the pattern that ARC was looking for for move optimizations, so we need to fix that simultaneously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index e3c5f83735..6f3b1aa7bf 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -1113,10 +1113,10 @@ static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType,
return false;
}
}
- // Lvalue-to-rvalue conversion (C++ 4.1):
- // An lvalue (3.10) of a non-function, non-array type T can be
- // converted to an rvalue.
- bool argIsLValue = From->isLValue();
+ // Lvalue-to-rvalue conversion (C++11 4.1):
+ // A glvalue (3.10) of a non-function, non-array type T can
+ // be converted to a prvalue.
+ bool argIsLValue = From->isGLValue();
if (argIsLValue &&
!FromType->isFunctionType() && !FromType->isArrayType() &&
S.Context.getCanonicalType(FromType) != S.Context.OverloadTy) {