1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -E %s -o %t.mm 2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s 3*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o %t-rw.cpp 4*f4a2713aSLionel Sambuc// 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*f4a2713aSLionel Sambuc// 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*f4a2713aSLionel Sambuc// rdar://14913632 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambucextern "C" void *sel_registerName(const char *); 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambucvoid x() { 11*f4a2713aSLionel Sambuc id y; 12*f4a2713aSLionel Sambuc for (id a in y) { 13*f4a2713aSLionel Sambuc } 14*f4a2713aSLionel Sambuc} 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc// CHECK: #ifdef _WIN64 17*f4a2713aSLionel Sambuc// CHECK-NEXT: typedef unsigned long long _WIN_NSUInteger; 18*f4a2713aSLionel Sambuc// CHECK-NEXT: #else 19*f4a2713aSLionel Sambuc// CHECK-NEXT: typedef unsigned int _WIN_NSUInteger; 20*f4a2713aSLionel Sambuc// CHECK-NEXT: #endif 21*f4a2713aSLionel Sambuc// CHECK: _WIN_NSUInteger limit = 22*f4a2713aSLionel Sambuc// CHECK-NEXT: ((_WIN_NSUInteger (*) (id, SEL, struct __objcFastEnumerationState *, id *, _WIN_NSUInteger))(void *)objc_msgSend) 23*f4a2713aSLionel Sambuc// CHECK-NEXT: ((id)l_collection, 24*f4a2713aSLionel Sambuc// CHECK-NEXT: sel_registerName("countByEnumeratingWithState:objects:count:"), 25*f4a2713aSLionel Sambuc// CHECK-NEXT: &enumState, (id *)__rw_items, (_WIN_NSUInteger)16); 26