summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2011-11-27 16:50:07 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2011-11-27 16:50:07 +0000
commit29526f09cee8b558f12fe544c5a5ce30e5e79e36 (patch)
treebffc15368788906fd2b162d1edb80e7a176c18bc /clang/lib/Sema/SemaDecl.cpp
parent0618d14edfd7a9e3d2f2e1db371b28601c2315c4 (diff)
downloadbcm5719-llvm-29526f09cee8b558f12fe544c5a5ce30e5e79e36.tar.gz
bcm5719-llvm-29526f09cee8b558f12fe544c5a5ce30e5e79e36.zip
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. llvm-svn: 145186
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index cd2f0715152..eaf778d1300 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud