annotate clang/test/Rewriter/rewrite-nested-blocks-2.mm @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
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.cpp
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
anatofuz
parents:
diff changeset
3 // grep "static void __FUNC_block_copy_" %t-rw.cpp | count 2
anatofuz
parents:
diff changeset
4 // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
anatofuz
parents:
diff changeset
5 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
anatofuz
parents:
diff changeset
6 // grep "static void __FUNC_block_copy_" %t-modern-rw.cpp | count 2
anatofuz
parents:
diff changeset
7 // rdar://8499592
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 typedef unsigned long size_t;
anatofuz
parents:
diff changeset
10 void Outer(void (^bk)());
anatofuz
parents:
diff changeset
11 void Inner(void (^bk)());
anatofuz
parents:
diff changeset
12 void INNER_FUNC(id d);
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 void FUNC() {
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 id bar = (id)42;
anatofuz
parents:
diff changeset
17 Outer(^{
anatofuz
parents:
diff changeset
18 Inner(^{
anatofuz
parents:
diff changeset
19 INNER_FUNC(bar);
anatofuz
parents:
diff changeset
20 });
anatofuz
parents:
diff changeset
21 });
anatofuz
parents:
diff changeset
22 }