summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/statements.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-14 00:23:56 +0000
committerChris Lattner <sabre@nondot.org>2009-06-14 00:23:56 +0000
commit8e3eed089060f316d48729c25814d697ec25b336 (patch)
tree2369867b9c626990c5b435d7d7587f5e1bd335ae /clang/test/Parser/statements.c
parent34a9566c8c3b3d90e8161ec6f6f8d682a7a3cfba (diff)
downloadbcm5719-llvm-8e3eed089060f316d48729c25814d697ec25b336.tar.gz
bcm5719-llvm-8e3eed089060f316d48729c25814d697ec25b336.zip
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 ^ ; llvm-svn: 73315
Diffstat (limited to 'clang/test/Parser/statements.c')
-rw-r--r--clang/test/Parser/statements.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Parser/statements.c b/clang/test/Parser/statements.c
index c5923bc0641..b95c23fb28b 100644
--- a/clang/test/Parser/statements.c
+++ b/clang/test/Parser/statements.c
@@ -54,3 +54,6 @@ void test6(void) {
while (0);
}
+int test7() {
+ return 4 // expected-error {{expected ';' after return statement}}
+}
OpenPOWER on IntegriCloud