summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-30 01:06:26 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-30 01:06:26 +0000
commit93513155e73c8c9d3fb1f4cf1874af7e4d934d53 (patch)
treeb8acd2b0ad94bcec47c162e7e2e5a37099f0c16f /clang/lib/Sema/SemaInit.cpp
parentb5488f45db64e9ab643a3003e23a12a543320d43 (diff)
downloadbcm5719-llvm-93513155e73c8c9d3fb1f4cf1874af7e4d934d53.tar.gz
bcm5719-llvm-93513155e73c8c9d3fb1f4cf1874af7e4d934d53.zip
Don't remove the init expression from the initializer list if it had a semantic error.
We already flag the error with InitListChecker's hadError and we mess up the AST unnecessarily. Fixes rdar://8605381. llvm-svn: 117760
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r--clang/lib/Sema/SemaInit.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 4e4558479aa..616b2a0bf52 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -723,7 +723,6 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity,
// PerformCopyInitialization produce the appropriate diagnostic.
SemaRef.PerformCopyInitialization(Entity, SourceLocation(),
SemaRef.Owned(expr));
- IList->setInit(Index, 0);
hadError = true;
++Index;
++StructuredIndex;
OpenPOWER on IntegriCloud