StmtPrinter: factor out arg printing code to PrintCallArgs
[clang.git] / test / CodeGenObjC / blocks.m
blobb96a8d942fac8551e361bf34a2c91356240435ad
1 // RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -fblocks -o %t %s
2 // rdar://6676764
4 struct S {
5   void (^F)(struct S*);
6 } P;
9 @interface T
11   - (int)foo: (T (^)(T*)) x;
12 @end
14 void foo(T *P) {
15  [P foo: 0];
18 @interface A 
19 -(void) im0;
20 @end
22 // RUN: grep 'define internal i32 @"__8-\[A im0\]_block_invoke_0"' %t
23 @implementation A
24 -(void) im0 {
25   (void) ^{ return 1; }();
27 @end
29 @interface B : A @end
30 @implementation B
31 -(void) im1 {
32   ^(void) { [self im0]; }();
34 -(void) im2 {
35   ^{ [super im0]; }();
37 -(void) im3 {
38   ^{ ^{[super im0];}(); }();
40 @end