xref: /aosp_15_r20/external/clang/test/Rewriter/rewrite-foreach-6.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://5716356
4*67e74705SXin Li// FIXME: Should be able to pipe into clang, but code is not
5*67e74705SXin Li// yet correct for other reasons: rdar://5716940
6*67e74705SXin Li
7*67e74705SXin Livoid *sel_registerName(const char *);
8*67e74705SXin Livoid objc_enumerationMutation(id);
9*67e74705SXin Li
10*67e74705SXin Li@class NSNotification;
11*67e74705SXin Li@class NSMutableArray;
12*67e74705SXin Li
13*67e74705SXin Livoid foo(NSMutableArray *notificationArray, id X) {
14*67e74705SXin Li  for (NSNotification *notification in notificationArray)
15*67e74705SXin Li    [X postNotification:notification];
16*67e74705SXin Li}
17*67e74705SXin Li
18