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
4 typedef unsigned long size_t;
5 extern "C" __declspec(dllexport) void BreakTheRewriter(void) {
6 __block int aBlockVariable = 0;
7 void (^aBlock)(void) = ^ {
11 void (^bBlocks)(void) = ^ {
19 __declspec(dllexport) extern "C" void AnotherBreakTheRewriter(int *p1, double d) {
21 __block int bBlockVariable = 0;
22 void (^aBlock)(void) = ^ {
26 void (^bBlocks)(void) = ^ {
37 __declspec (dllexport)
39 main (int argc, char *argv[])
41 __block int bBlockVariable = 0;
42 void (^aBlock)(void) = ^ {
47 static char stringtype;
48 char CFStringGetTypeID();
51 static void initStatics(int arg, ...) {
53 stringtype = CFStringGetTypeID();
56 static void initStatics1(...) {
58 stringtype = CFStringGetTypeID();
61 static void initStatics2() {
63 stringtype = CFStringGetTypeID();
67 static inline const void *auto_zone_base_pointer(void *zone, const void *ptr) { return 0; }
74 // use before definition
79 // use before definition
81 __attribute__((__blocks__(byref))) id *listp;
83 void (^B)(void) = ^(void) {
89 - (void) Meth { __attribute__((__blocks__(byref))) void ** listp = (void **)list; }