]> granicus.if.org Git - clang/commitdiff
When assigning from an rvalue to a const reference, the implicit cast from T -> const...
authorAnders Carlsson <andersca@mac.com>
Tue, 19 May 2009 00:38:24 +0000 (00:38 +0000)
committerAnders Carlsson <andersca@mac.com>
Tue, 19 May 2009 00:38:24 +0000 (00:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72082 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclCXX.cpp

index 78123015a37bf79c83699d770441bd591493c546..feb94569ed2b3566940fd97b67629a0c8c9b6a05 100644 (file)
@@ -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;
   }