summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/protocol-test-1.m
blob: 6ca2bb875b5d40fef6b3b53e382e784d07f6be32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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
OpenPOWER on IntegriCloud