Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Rewriter / rewrite-captured-nested-bvar.c
blob34236dd646c8f0aecf4b67c8a615bd7d54bac36f
1 // RUN: %clang_cc1 -x c -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
2 // RUN: FileCheck --input-file=%t-rw.cpp %s
4 void q(void (^p)(void)) {
5 p();
8 void f(void) {
9 __block char BYREF_VAR_CHECK = 'a';
10 __block char d = 'd';
11 q(^{
12 q(^{
13 __block char e = 'e';
14 char l = 'l';
15 BYREF_VAR_CHECK = 'b';
16 d = 'd';
17 q(^{
18 e = '1';
19 BYREF_VAR_CHECK = '2';
20 d = '3';
23 });
24 });
27 int main(void) {
28 f();
29 return 0;
32 // CHECK: (__Block_byref_BYREF_VAR_CHECK_0 *)BYREF_VAR_CHECK
33 // CHECK: (__Block_byref_BYREF_VAR_CHECK_0 *)&BYREF_VAR_CHECK
34 // CHECK: (struct __Block_byref_BYREF_VAR_CHECK_0 *)&BYREF_VAR_CHECK, (struct __Block_byref_d_1 *)&d, 570425344));