diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-06-22 15:05:02 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-06-22 15:05:02 +0000 |
commit | b4b7b5034bb8304ed03416635bf64c75c39889fc (patch) | |
tree | a87c07cb03afa15997b8339b78e203a68e907b99 /lib/Sema/SemaInit.cpp | |
parent | 45ba8a6ab70afd418d35d2502849fa11ff73ed1a (diff) |
Give MaterializeTemporaryExpr the exact type of the lvalue it binds
to, including cv-qualifications.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 3231455f5a..e93d2d83cd 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -4080,7 +4080,9 @@ InitializationSequence::Perform(Sema &S, return ExprError(); // Materialize the temporary into memory. - CurInit = new (S.Context) MaterializeTemporaryExpr(CurInit.get(), + CurInit = new (S.Context) MaterializeTemporaryExpr( + Entity.getType().getNonReferenceType(), + CurInit.get(), Entity.getType()->isLValueReferenceType()); break; |