]> granicus.if.org Git - clang/commitdiff
Eliminate yet another old-school PerformCopyInitialization.
authorAnders Carlsson <andersca@mac.com>
Sat, 30 Jan 2010 01:56:32 +0000 (01:56 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 30 Jan 2010 01:56:32 +0000 (01:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94874 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaInit.cpp

index 910d3f6469e56b640e894868b01191e541d57a90..b0dee9c691774a9045a3b0c9d6a8347124cf156a 100644 (file)
@@ -705,7 +705,9 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity,
     } else {
       // We cannot initialize this element, so let
       // PerformCopyInitialization produce the appropriate diagnostic.
-      SemaRef.PerformCopyInitialization(expr, ElemType, Sema::AA_Initializing);
+      SemaRef.PerformCopyInitialization(Entity, SourceLocation(), 
+                                        SemaRef.Owned(expr));
+      IList->setInit(Index, 0);
       hadError = true;
       ++Index;
       ++StructuredIndex;