From 91f5ae5022c75fb35b77aeffd5dac4163f456ee8 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 23 Feb 2012 02:25:10 +0000 Subject: Try to handle qualifiers more consistently for array InitListExprs. Fixes , and makes the ASTs a bit more self-consistent. (I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.) llvm-svn: 151229 --- clang/lib/Sema/SemaDecl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'clang/lib/Sema/SemaDecl.cpp') diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 94d8f62ba6d..05136b882bd 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -6226,10 +6226,8 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, // completed by the initializer. For example: // int ary[] = { 1, 3, 5 }; // "ary" transitions from an IncompleteArrayType to a ConstantArrayType. - if (!VDecl->isInvalidDecl() && (DclT != SavT)) { + if (!VDecl->isInvalidDecl() && (DclT != SavT)) VDecl->setType(DclT); - Init->setType(DclT.getNonReferenceType()); - } // Check any implicit conversions within the expression. CheckImplicitConversions(Init, VDecl->getLocation()); -- cgit v1.2.3