From: Anders Carlsson Date: Tue, 19 May 2009 00:38:24 +0000 (+0000) Subject: When assigning from an rvalue to a const reference, the implicit cast from T -> const... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6865480f0ccf049ef53bd1e058aaacc4f77beebe;p=clang 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 --- 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; }