blob: fae11a0adfa379a828f50c8515cc1535f151c9ca [file] [log] [blame]
Fariborz Jahaniana7432662010-03-04 23:13:29 +00001// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
2// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"id=void*" -D"__declspec(X)=" %t-rw.cpp
Fariborz Jahanian84aa9462010-02-02 18:35:07 +00003// radar 7589414
4
5@protocol NSPortDelegate;
6@interface NSConnection @end
7
8@interface NSMessagePort
9- (void) clone;
10@end
11
12@implementation NSMessagePort
13- (void) clone {
14 NSConnection <NSPortDelegate> *conn = 0;
15 id <NSPortDelegate> *idc = 0;
16}
17@end
18
Fariborz Jahanian32132a02010-02-03 21:29:28 +000019// radar 7607413
20@protocol Proto1, Proto2;
21
22@protocol Proto
23@end
24
25unsigned char func(id<Proto1, Proto2> inProxy);
26
27id bar(id);
28
29void f() {
30 id a;
31 id b = bar((id <Proto>)a);
32}
Fariborz Jahanian07acdf42010-09-24 18:36:58 +000033
34// rdar://8472487
35@protocol NSObject @end
36@class NSRunLoop;
37
38@protocol CoreDAVTaskManager <NSObject>
39 @property (retain) NSRunLoop *workRunLoop;
40@end
41
Fariborz Jahanian24f9cab2010-09-30 20:41:32 +000042
43// rdar://8475819
44@protocol some_protocol;
45
46void foo (int n)
47{
48 id<some_protocol> array[n];
49}
50