1 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
2 // RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp
5 typedef unsigned long size_t;
14 __block CFUUIDBytes bytes;
28 // rewriting multiple __block decls on wintin same decl stmt.
32 __block float FLOAT1, FT2, FFFFFFFF3,
35 __block void (^B)(), (^BB)();
38 // rewriting multiple __block decls on wintin same decl stmt
40 int rdar7547630(const char *keybuf, const char *valuebuf) {
41 __block int BI1 = 1, BI2 = 2;
43 double __block BYREFVAR = 1.34, BYREFVAR_NO_INIT, BYREFVAR2 = 1.37;
45 __block const char *keys = keybuf, *values = valuebuf, *novalues;
56 z w(int loc, int len);
58 @interface rdar11326988
60 @implementation rdar11326988
61 - (void)y:(int)options {
62 __attribute__((__blocks__(byref))) z firstRange = w(1, 0);
68 int Test18799145() { return ^(){return 0;}(); }