Fariborz Jahanian | a743266 | 2010-03-04 23:13:29 +0000 | [diff] [blame] | 1 | // 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 Jahanian | 84aa946 | 2010-02-02 18:35:07 +0000 | [diff] [blame] | 3 | // 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 Jahanian | 32132a0 | 2010-02-03 21:29:28 +0000 | [diff] [blame] | 19 | // radar 7607413 |
| 20 | @protocol Proto1, Proto2; |
| 21 | |
| 22 | @protocol Proto |
| 23 | @end |
| 24 | |
| 25 | unsigned char func(id<Proto1, Proto2> inProxy); |
| 26 | |
| 27 | id bar(id); |
| 28 | |
| 29 | void f() { |
| 30 | id a; |
| 31 | id b = bar((id <Proto>)a); |
| 32 | } |
Fariborz Jahanian | 07acdf4 | 2010-09-24 18:36:58 +0000 | [diff] [blame] | 33 | |
| 34 | // rdar://8472487 |
| 35 | @protocol NSObject @end |
| 36 | @class NSRunLoop; |
| 37 | |
| 38 | @protocol CoreDAVTaskManager <NSObject> |
| 39 | @property (retain) NSRunLoop *workRunLoop; |
| 40 | @end |
| 41 | |
Fariborz Jahanian | 24f9cab | 2010-09-30 20:41:32 +0000 | [diff] [blame] | 42 | |
| 43 | // rdar://8475819 |
| 44 | @protocol some_protocol; |
| 45 | |
| 46 | void foo (int n) |
| 47 | { |
| 48 | id<some_protocol> array[n]; |
| 49 | } |
| 50 | |