aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-05-19 00:38:24 +0000
committerAnders Carlsson <andersca@mac.com>2009-05-19 00:38:24 +0000
commit6865480f0ccf049ef53bd1e058aaacc4f77beebe (patch)
tree1e9701ec7c884bbbc7990ccfca49594e9eae308d
parent4a2487aeacf9f35ce553318c2eb39c20ec23845e (diff)
When assigning from an rvalue to a const reference, the implicit cast from T -> const T is not an lvalue cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72082 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaDeclCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 78123015a3..feb94569ed 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -2269,7 +2269,7 @@ Sema::CheckReferenceInit(Expr *&Init, QualType DeclType,
} else {
// FIXME: Binding to a subobject of the rvalue is going to require more
// AST annotation than this.
- ImpCastExprToType(Init, T1, /*isLvalue=*/true);
+ ImpCastExprToType(Init, T1, /*isLvalue=*/false);
}
return false;
}