improve error recovery handling broken 'then' or 'else' stmts in
if statements. This implements Sema/if-empty-body.c:f3, silencing
a bogus secondary warning. It also improve the location info for
the nullstmts created for recovery purposes.
llvm-svn: 43440
diff --git a/clang/test/Sema/if-empty-body.c b/clang/test/Sema/if-empty-body.c
index 1de6ad5..376eb98 100644
--- a/clang/test/Sema/if-empty-body.c
+++ b/clang/test/Sema/if-empty-body.c
@@ -7,3 +7,10 @@
void f2(int a) {
if (a) {}
}
+
+void f3() {
+ if (1)
+ xx; // expected-error {{use of undeclared identifier}}
+ return; // no empty body warning.
+}
+