2012-06-20 14:18:46 +08:00
|
|
|
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
|
2010-10-06 02:05:06 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
|
|
|
|
// grep "static void __FUNC_block_copy_" %t-rw.cpp | count 2
|
2012-04-17 06:14:01 +08:00
|
|
|
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
|
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
|
|
|
|
// grep "static void __FUNC_block_copy_" %t-modern-rw.cpp | count 2
|
2010-10-06 02:05:06 +08:00
|
|
|
// rdar://8499592
|
|
|
|
|
2012-05-04 05:44:12 +08:00
|
|
|
typedef unsigned long size_t;
|
2010-10-06 02:05:06 +08:00
|
|
|
void Outer(void (^bk)());
|
|
|
|
void Inner(void (^bk)());
|
|
|
|
void INNER_FUNC(id d);
|
|
|
|
|
|
|
|
void FUNC() {
|
|
|
|
|
|
|
|
id bar = (id)42;
|
|
|
|
Outer(^{
|
|
|
|
Inner(^{
|
|
|
|
INNER_FUNC(bar);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|