22 lines · plain
1// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp2// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp3// grep "static void __FUNC_block_copy_" %t-rw.cpp | count 24// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp5// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp6// grep "static void __FUNC_block_copy_" %t-modern-rw.cpp | count 27 8typedef unsigned long size_t;9void Outer(void (^bk)());10void Inner(void (^bk)());11void INNER_FUNC(id d);12 13void FUNC() {14 15 id bar = (id)42;16 Outer(^{17 Inner(^{18 INNER_FUNC(bar);19 });20 }); 21}22