blob: 80ad7fc4e631c3aa33ec226c89b637a7a1261371 [file] [log] [blame]
Fariborz Jahanian1d35b162010-02-22 20:48:10 +00001// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
2// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3// radar 7669784
4
5typedef void * id;
6void *sel_registerName(const char *);
7
8@interface NSMutableString
9- (NSMutableString *)string;
10@end
11
12@interface Z
13@end
14
15@implementation Z
16
17- (void)x {
18 id numbers;
19 int i, numbersCount = 42;
20 __attribute__((__blocks__(byref))) int blockSum = 0;
21 void (^add)(id n, int idx, char *stop) = ^(id n, int idx, char *stop) { };
22 [numbers enumerateObjectsUsingBlock:add];
23 NSMutableString *forwardAppend = [NSMutableString string];
24 __attribute__((__blocks__(byref))) NSMutableString *blockAppend = [NSMutableString string];
25}
26
27@end
28