diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-11-27 16:50:07 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-11-27 16:50:07 +0000 |
commit | 13dc8f98f6108dca8aaa9721567ed5a2d9911e0f (patch) | |
tree | c574193fb93fa87e8b2d568d1bf5cda53baa4b8a /lib/Sema/SemaDecl.cpp | |
parent | 1376ba9dddccc02e8c187bbfa4c66f2c0938b0c0 (diff) |
Reference initialization with initializer lists.
This supports single-element initializer lists for references according to DR1288, as well as creating temporaries and binding to them for other initializer lists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index cd2f071515..eaf778d130 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -6199,7 +6199,7 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, // "ary" transitions from a VariableArrayType to a ConstantArrayType. if (!VDecl->isInvalidDecl() && (DclT != SavT)) { VDecl->setType(DclT); - Init->setType(DclT); + Init->setType(DclT.getNonReferenceType()); } // Check any implicit conversions within the expression. |