| 1 |
// RUN: %clang_cc1 -E %s -o %t.mm |
| 2 |
// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s |
| 3 |
// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o %t-rw.cpp |
| 4 |
// RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -Werror -Wno-address-of-temporary -D"Class=struct objc_class *" -D"id=struct objc_object *" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp -Wno-attributes |
| 5 |
// RUN: %clang_cc1 -fsyntax-only -triple x86_64-pc-win32 -Werror -Wno-address-of-temporary -D"Class=struct objc_class *" -D"id=struct objc_object *" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp -Wno-attributes |
| 6 |
|
| 7 |
extern "C" void *sel_registerName(const char *); |
| 8 |
|
| 9 |
void x() { |
| 10 |
id y; |
| 11 |
for (id a in y) { |
| 12 |
} |
| 13 |
} |
| 14 |
|
| 15 |
// CHECK: #ifdef _WIN64 |
| 16 |
// CHECK-NEXT: typedef unsigned long long _WIN_NSUInteger; |
| 17 |
// CHECK-NEXT: #else |
| 18 |
// CHECK-NEXT: typedef unsigned int _WIN_NSUInteger; |
| 19 |
// CHECK-NEXT: #endif |
| 20 |
// CHECK: _WIN_NSUInteger limit = |
| 21 |
// CHECK-NEXT: ((_WIN_NSUInteger (*) (id, SEL, struct __objcFastEnumerationState *, id *, _WIN_NSUInteger))(void *)objc_msgSend) |
| 22 |
// CHECK-NEXT: ((id)l_collection, |
| 23 |
// CHECK-NEXT: sel_registerName("countByEnumeratingWithState:objects:count:"), |
| 24 |
// CHECK-NEXT: &enumState, (id *)__rw_items, (_WIN_NSUInteger)16); |