summaryrefslogtreecommitdiffstats
path: root/test/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser')
-rw-r--r--test/Parser/method-def-in-class.m25
-rw-r--r--test/Parser/objc-try-catch-1.m4
2 files changed, 27 insertions, 2 deletions
diff --git a/test/Parser/method-def-in-class.m b/test/Parser/method-def-in-class.m
new file mode 100644
index 0000000..490c055
--- /dev/null
+++ b/test/Parser/method-def-in-class.m
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar://7029784
+
+@interface A
+-(id) f0 { // expected-error {{expected ';' after method prototype}}
+ assert(0);
+}
+@end
+
+@interface B
+-(id) f0 { // expected-error {{expected ';' after method prototype}}
+ assert(0);
+@end
+
+@interface C
+- (id) f0 { // expected-error {{expected ';' after method prototype}}
+ assert(0);
+};
+@end
+
+@interface D
+- (id) f0 { // expected-error {{expected ';' after method prototype}}
+ assert(0);
+@property int P;
+@end
diff --git a/test/Parser/objc-try-catch-1.m b/test/Parser/objc-try-catch-1.m
index 7193691..a3220eb 100644
--- a/test/Parser/objc-try-catch-1.m
+++ b/test/Parser/objc-try-catch-1.m
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -fsyntax-only -verify -x objective-c++ %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-exceptions -x objective-c++ %s
void * proc();
@interface NSConstantString
OpenPOWER on IntegriCloud