Don't remove the init expression from the initializer list if it had a semantic error.
commit6ac524b7c3428c9449db281a4d851351f8ec4dff
authorArgiris Kirtzidis <akyrtzi@gmail.com>
Sat, 30 Oct 2010 01:06:26 +0000 (30 01:06 +0000)
committerArgiris Kirtzidis <akyrtzi@gmail.com>
Sat, 30 Oct 2010 01:06:26 +0000 (30 01:06 +0000)
tree505f005cfd34e5de348296ec854c6a72f04fd835
parent1dd66c2d1b2ba542ece3a93c3065dcb1452a93fd
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117760 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaInit.cpp
test/SemaCXX/crashes.cpp