minix/external/bsd/llvm/dist/clang/test/Rewriter/objc-modern-fast-enumeration.mm
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

25 lines
1.3 KiB
Text

// RUN: %clang_cc1 -E %s -o %t.mm
// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s
// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o %t-rw.cpp
// 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
// 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
// rdar://14913632
extern "C" void *sel_registerName(const char *);
void x() {
id y;
for (id a in y) {
}
}
// CHECK: #ifdef _WIN64
// CHECK-NEXT: typedef unsigned long long _WIN_NSUInteger;
// CHECK-NEXT: #else
// CHECK-NEXT: typedef unsigned int _WIN_NSUInteger;
// CHECK-NEXT: #endif
// CHECK: _WIN_NSUInteger limit =
// CHECK-NEXT: ((_WIN_NSUInteger (*) (id, SEL, struct __objcFastEnumerationState *, id *, _WIN_NSUInteger))(void *)objc_msgSend)
// CHECK-NEXT: ((id)l_collection,
// CHECK-NEXT: sel_registerName("countByEnumeratingWithState:objects:count:"),
// CHECK-NEXT: &enumState, (id *)__rw_items, (_WIN_NSUInteger)16);