Home | History | Annotate | Download | only in Rewriter
      1 // RUN: %clang_cc1 -E %s -o %t.m
      2 // RUN: %clang_cc1 -fblocks -rewrite-objc -fms-extensions %t.m -o %t-rw.cpp 
      3 // RUN: FileCheck --input-file=%t-rw.cpp %s
      4 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
      5 
      6 @interface Foo {
      7     void (^_block)(void);
      8 }
      9 @end
     10 
     11 @implementation Foo
     12 - (void)bar {
     13     _block();
     14 }
     15 @end
     16 
     17 // CHECK: ((void (*)(struct __block_impl *))((struct __block_impl *)(*(void (**)(void))((char *)self + OBJC_IVAR_$_Foo$_block)))->FuncPtr)((struct __block_impl *)(*(void (**)(void))((char *)self + OBJC_IVAR_$_Foo$_block)));
     18