diff options
author | John McCall <rjmccall@apple.com> | 2011-08-30 00:57:29 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-08-30 00:57:29 +0000 |
commit | 154a2fd3cb187a40481548dc7e21c29a7416b029 (patch) | |
tree | 5bd0d6fc12e1913d561c3937723a60b898603103 /clang/lib/Sema/SemaOverload.cpp | |
parent | cd267f7e0dd653fee205dd0d1d1375d3bbb85856 (diff) | |
download | bcm5719-llvm-154a2fd3cb187a40481548dc7e21c29a7416b029.tar.gz bcm5719-llvm-154a2fd3cb187a40481548dc7e21c29a7416b029.zip |
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.
llvm-svn: 138789
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index e3c5f837353..6f3b1aa7bf5 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/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) { |