aboutsummaryrefslogtreecommitdiff
path: root/test/Parser
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-03-19 20:27:40 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-03-19 20:27:40 +0000
commit5bba867123a788085b677fb4b12f21917dec5c51 (patch)
tree0ad238c482525ad52f5ae0ab280f429acf9df265 /test/Parser
parentc30eb51b639e132af458fbf7647eefae6edb93ac (diff)
Objective-C [qoi]: Provide improved parse diagnostics when
closing rbrace is missing in an ObjC class declaration. Can do beter than this, but it involves addition of overhead which will be present in correct code. // rdar://6854840 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177435 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser')
-rw-r--r--test/Parser/missing-closing-rbrace.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Parser/missing-closing-rbrace.m b/test/Parser/missing-closing-rbrace.m
new file mode 100644
index 0000000000..ae1291e1e3
--- /dev/null
+++ b/test/Parser/missing-closing-rbrace.m
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar: //6854840
+@interface A {@end // expected-error {{'@end' appears where closing brace '}' is expected}}\
+ // expected-note {{to match this '{'}}\
+ // expected-note {{class started here}}
+ // expected-error {{expected '}'}} expected-error {{missing '@end'}}