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_WIN64 -D"Class=struct objc_class *" -D"id=struct objc_object *" -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp -Wno-attributes 6// rdar://14913632 7 8extern "C" void *sel_registerName(const char *); 9 10void x() { 11 id y; 12 for (id a in y) { 13 } 14} 15 16// CHECK: #ifdef _WIN64 17// CHECK-NEXT: typedef unsigned long long _WIN_NSUInteger; 18// CHECK-NEXT: #else 19// CHECK-NEXT: typedef unsigned int _WIN_NSUInteger; 20// CHECK-NEXT: #endif 21// CHECK: _WIN_NSUInteger limit = 22// CHECK-NEXT: ((_WIN_NSUInteger (*) (id, SEL, struct __objcFastEnumerationState *, id *, _WIN_NSUInteger))(void *)objc_msgSend) 23// CHECK-NEXT: ((id)l_collection, 24// CHECK-NEXT: sel_registerName("countByEnumeratingWithState:objects:count:"), 25// CHECK-NEXT: &enumState, (id *)__rw_items, (_WIN_NSUInteger)16); 26