blob: 5f12010afd4ecabb4367be565ca939d1ebe30382 [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}