aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/SemaObjC/protocol-test-1.m20
-rw-r--r--test/SemaObjC/protocol-test-2.m18
2 files changed, 16 insertions, 22 deletions
diff --git a/test/SemaObjC/protocol-test-1.m b/test/SemaObjC/protocol-test-1.m
deleted file mode 100644
index 6ca2bb875b..0000000000
--- a/test/SemaObjC/protocol-test-1.m
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: clang-cc -fsyntax-only -verify %s
-
-@protocol PROTO1
-@required
-- (int) FooBar;
-@optional
-- (void) MyMethod1;
-+ (int) S;
-@end
-
-@interface INTF1
-@required // expected-error {{directive may only be specified in protocols only}}
-- (int) FooBar;
-- (int) FooBar1;
-- (int) FooBar2;
-@optional // expected-error {{directive may only be specified in protocols only}}
-+ (int) C;
-
-- (int)I;
-@end
diff --git a/test/SemaObjC/protocol-test-2.m b/test/SemaObjC/protocol-test-2.m
index 1ccc2de93e..9fbdc16759 100644
--- a/test/SemaObjC/protocol-test-2.m
+++ b/test/SemaObjC/protocol-test-2.m
@@ -1,15 +1,29 @@
// RUN: clang-cc -fsyntax-only -verify %s
-@interface INTF1 @end
+@interface INTF1
+@required // expected-error {{directive may only be specified in protocols only}}
+- (int) FooBar;
+- (int) FooBar1;
+- (int) FooBar2;
+@optional // expected-error {{directive may only be specified in protocols only}}
++ (int) C;
+
+- (int)I;
+@end
@protocol p1,p2,p3;
@protocol p1;
@protocol PROTO1
-- (INTF1<p1>*) meth;
+@required
+- (int) FooBar;
+@optional
+- (void) MyMethod1;
++ (int) S;
@end
+
@protocol PROTO2<p1>
@end