diff options
author | Chris Lattner <sabre@nondot.org> | 2009-06-14 00:23:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-06-14 00:23:56 +0000 |
commit | 7b3684afffa2d5eda3dd6930f01faaa673686c16 (patch) | |
tree | d2173fc0e0a3f15c083bca544c7a8134caefb10f /test/Parser | |
parent | 6869d8ea1bb7d191b5b290f5a55ee74f2174829a (diff) |
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
Diffstat (limited to 'test/Parser')
-rw-r--r-- | test/Parser/statements.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Parser/statements.c b/test/Parser/statements.c index c5923bc064..b95c23fb28 100644 --- a/test/Parser/statements.c +++ b/test/Parser/statements.c @@ -54,3 +54,6 @@ void test6(void) { while (0); } +int test7() { + return 4 // expected-error {{expected ';' after return statement}} +} |