blob: 5159d383e5778334bba53af343bed142dabecf5c [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// 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
Fariborz Jahanian42f1e652011-02-24 21:29:21 +00002// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
Chris Lattner338d1e22008-01-31 05:10:40 +00003// rdar://5716356
4// FIXME: Should be able to pipe into clang, but code is not
5// yet correct for other reasons: rdar://5716940
6
Fariborz Jahanian42f1e652011-02-24 21:29:21 +00007void *sel_registerName(const char *);
8void objc_enumerationMutation(id);
9
Chris Lattner338d1e22008-01-31 05:10:40 +000010@class NSNotification;
11@class NSMutableArray;
12
13void foo(NSMutableArray *notificationArray, id X) {
14 for (NSNotification *notification in notificationArray)
15 [X postNotification:notification];
16}
17