Debian Codegraph @

clang/test/Rewriter/rewrite-foreach-protocol-id.m

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 -std=gnu++98 -fblocks -Wno-address-of-temporary -D"id=struct objc_object*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3
4 void *sel_registerName(const char *);
5 void objc_enumerationMutation(id);
6
7 @protocol CoreDAVLeafDataPayload @end
8
9 @class NSString;
10
11 @interface CoreDAVAction
12 - (id) context;
13 @end
14
15 @interface I
16 {
17 id uuidsToAddActions;
18 }
19 @end
20
21 @implementation I
22 - (void) Meth {
23 for (id<CoreDAVLeafDataPayload> uuid in uuidsToAddActions) {
24 CoreDAVAction *action = 0;
25 id <CoreDAVLeafDataPayload> payload = [action context];
26 }
27 }
28 @end