aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-01-30 01:56:32 +0000
committerAnders Carlsson <andersca@mac.com>2010-01-30 01:56:32 +0000
commitca755fe38f00d63363b3a3ac2a1ae6c1eb2957f9 (patch)
treeb783638f1e99f1162849b2f017e3935637231c96 /lib/Sema/SemaInit.cpp
parentc9a89fec60a20eb3269caa95eca048d45ab215ad (diff)
Eliminate yet another old-school PerformCopyInitialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 910d3f6469..b0dee9c691 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -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;