change ParseStatementOrDeclaration to emit the 'missing ;' with
ExpectAndConsume instead of custom diag logic. This gets us an
insertion hint and positions the ; at the end of the line
instead of on the next token. Before:
t.c:5:1: error: expected ';' after return statement
}
^
after:
t.c:4:11: error: expected ';' after return statement
return 4
^
;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73315 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/statements.c b/test/Parser/statements.c
index c5923bc..b95c23f 100644
--- a/test/Parser/statements.c
+++ b/test/Parser/statements.c
@@ -54,3 +54,6 @@
while (0);
}
+int test7() {
+ return 4 // expected-error {{expected ';' after return statement}}
+}