diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-28 23:46:58 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-28 23:46:58 +0000 |
commit | a61c9c98319fa18db0856b5fc1ce0490e61dc06a (patch) | |
tree | b463a43ba2419c14335a851fe1162727fef40d2e /test/Rewriter | |
parent | 3fa023249555204d0d625c99428e7b9ab95e177a (diff) |
Objective-C modern rewriter. Patch to fix a rewriting bug
rewriting an Objective-C block. Patch by Ryan Govostes.
rdar://18799145
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Rewriter')
-rw-r--r-- | test/Rewriter/rewrite-block-literal.mm | 2 | ||||
-rw-r--r-- | test/Rewriter/rewrite-modern-block.mm | 3 | ||||
-rw-r--r-- | test/Rewriter/rewrite-modern-captured-nested-bvar.mm | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/test/Rewriter/rewrite-block-literal.mm b/test/Rewriter/rewrite-block-literal.mm index 43f581125b..cde6efcbf2 100644 --- a/test/Rewriter/rewrite-block-literal.mm +++ b/test/Rewriter/rewrite-block-literal.mm @@ -70,7 +70,7 @@ static int global_x = 10; void (^global_block)(void) = ^{ printf("global x is %d\n", global_x); }; // CHECK: static __global_block_block_impl_0 __global_global_block_block_impl_0((void *)__global_block_block_func_0, &__global_block_block_desc_0_DATA); -// CHECK: void (*global_block)(void) = (void (*)())&__global_global_block_block_impl_0; +// CHECK: void (*global_block)(void) = ((void (*)())&__global_global_block_block_impl_0); typedef void (^void_block_t)(void); diff --git a/test/Rewriter/rewrite-modern-block.mm b/test/Rewriter/rewrite-modern-block.mm index 23029654c9..926ee36f1a 100644 --- a/test/Rewriter/rewrite-modern-block.mm +++ b/test/Rewriter/rewrite-modern-block.mm @@ -63,3 +63,6 @@ z w(int loc, int len); options &= ~(1 | 2); } @end + +// rdar://18799145 +int Test18799145() { return ^(){return 0;}(); } diff --git a/test/Rewriter/rewrite-modern-captured-nested-bvar.mm b/test/Rewriter/rewrite-modern-captured-nested-bvar.mm index a8fd180733..be7548c778 100644 --- a/test/Rewriter/rewrite-modern-captured-nested-bvar.mm +++ b/test/Rewriter/rewrite-modern-captured-nested-bvar.mm @@ -32,4 +32,4 @@ int main() { // CHECK 2: (__Block_byref_BYREF_VAR_CHECK_0 *)BYREF_VAR_CHECK // CHECK: {(void*)0,(__Block_byref_BYREF_VAR_CHECK_0 *)&BYREF_VAR_CHECK, 0, sizeof(__Block_byref_BYREF_VAR_CHECK_0), 'a'} -// CHECK: __Block_byref_BYREF_VAR_CHECK_0 *)&BYREF_VAR_CHECK, (__Block_byref_d_1 *)&d, 570425344)); +// CHECK: __Block_byref_BYREF_VAR_CHECK_0 *)&BYREF_VAR_CHECK, (__Block_byref_d_1 *)&d, 570425344))); |