Debian Codegraph @

clang/test/Rewriter/rewrite-protocol-qualified.mm

raw
1 // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %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
3
4 @protocol NSPortDelegate;
5 @interface NSConnection @end
6
7 @interface NSMessagePort
8 - (void) clone;
9 @end
10
11 @implementation NSMessagePort
12 - (void) clone {
13 NSConnection <NSPortDelegate> *conn = 0;
14 id <NSPortDelegate> *idc = 0;
15 }
16 @end
17
18 @protocol Proto1, Proto2;
19
20 @protocol Proto
21 @end
22
23 unsigned char func(id<Proto1, Proto2> inProxy);
24
25 id bar(id);
26
27 void f() {
28 id a;
29 id b = bar((id <Proto>)a);
30 }
31
32 @protocol NSObject @end
33 @class NSRunLoop;
34
35 @protocol CoreDAVTaskManager <NSObject>
36 @property (retain) NSRunLoop *workRunLoop;
37 @end
38
39 @protocol some_protocol;
40
41 void foo (int n)
42 {
43 id<some_protocol> array[n];
44 }
45