blob: 46afdf16889c9ead6af7e05b34ef02551f7967a5 [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// 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
Fariborz Jahanian92c85682010-10-05 18:05:06 +00002// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3// grep "static void __FUNC_block_copy_" %t-rw.cpp | count 2
Fariborz Jahanian43aa1c32012-04-16 22:14:01 +00004// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
5// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
6// grep "static void __FUNC_block_copy_" %t-modern-rw.cpp | count 2
Fariborz Jahanian92c85682010-10-05 18:05:06 +00007// rdar://8499592
8
Fariborz Jahanian8b08adb2012-05-03 21:44:12 +00009typedef unsigned long size_t;
Fariborz Jahanian92c85682010-10-05 18:05:06 +000010void Outer(void (^bk)());
11void Inner(void (^bk)());
12void INNER_FUNC(id d);
13
14void FUNC() {
15
16 id bar = (id)42;
17 Outer(^{
18 Inner(^{
19 INNER_FUNC(bar);
20 });
21 });
22}