1 // RUN: %clang_cc1 -fms-extensions -U__declspec -rewrite-objc -x objective-c++ -fblocks -o %t-rw.cpp %s
2 // RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Werror -Wno-address-of-temporary -Wno-attributes -D"Class=void*" -D"id=void*" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp
5 typedef unsigned long size_t;
6 extern "C" __declspec(dllexport) void BreakTheRewriter(void) {
7 __block int aBlockVariable = 0;
8 void (^aBlock)(void) = ^ {
12 void (^bBlocks)(void) = ^ {
20 __declspec(dllexport) extern "C" void AnotherBreakTheRewriter(int *p1, double d) {
22 __block int bBlockVariable = 0;
23 void (^aBlock)(void) = ^ {
27 void (^bBlocks)(void) = ^ {
38 __declspec (dllexport)
40 main (int argc, char *argv[])
42 __block int bBlockVariable = 0;
43 void (^aBlock)(void) = ^ {
49 static char stringtype;
50 char CFStringGetTypeID();
53 static void initStatics(int arg, ...) {
55 stringtype = CFStringGetTypeID();
58 static void initStatics1(...) {
60 stringtype = CFStringGetTypeID();
63 static void initStatics2() {
65 stringtype = CFStringGetTypeID();
70 static inline const void *auto_zone_base_pointer(void *zone, const void *ptr) { return 0; }
77 // radar 7589385 use before definition
82 // radar 7589385 use before definition
84 __attribute__((__blocks__(byref))) id *listp;
86 void (^B)(void) = ^(void) {
92 - (void) Meth { __attribute__((__blocks__(byref))) void ** listp = (void **)list; }