xref: /aosp_15_r20/external/clang/test/Rewriter/rewrite-foreach-protocol-id.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// 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*67e74705SXin Li// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=struct objc_object*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3*67e74705SXin Li// rdar:// 9039342
4*67e74705SXin Li
5*67e74705SXin Livoid *sel_registerName(const char *);
6*67e74705SXin Livoid objc_enumerationMutation(id);
7*67e74705SXin Li
8*67e74705SXin Li@protocol CoreDAVLeafDataPayload @end
9*67e74705SXin Li
10*67e74705SXin Li@class NSString;
11*67e74705SXin Li
12*67e74705SXin Li@interface CoreDAVAction
13*67e74705SXin Li- (id) context;
14*67e74705SXin Li@end
15*67e74705SXin Li
16*67e74705SXin Li@interface I
17*67e74705SXin Li{
18*67e74705SXin Li  id uuidsToAddActions;
19*67e74705SXin Li}
20*67e74705SXin Li@end
21*67e74705SXin Li
22*67e74705SXin Li@implementation I
23*67e74705SXin Li- (void) Meth {
24*67e74705SXin Li  for (id<CoreDAVLeafDataPayload> uuid in uuidsToAddActions) {
25*67e74705SXin Li    CoreDAVAction *action = 0;
26*67e74705SXin Li    id <CoreDAVLeafDataPayload> payload = [action context];
27*67e74705SXin Li  }
28*67e74705SXin Li}
29*67e74705SXin Li@end
30