blob: b96a8d942fac8551e361bf34a2c91356240435ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -fblocks -o %t %s
// rdar://6676764
struct S {
void (^F)(struct S*);
} P;
@interface T
- (int)foo: (T (^)(T*)) x;
@end
void foo(T *P) {
[P foo: 0];
}
@interface A
-(void) im0;
@end
// RUN: grep 'define internal i32 @"__8-\[A im0\]_block_invoke_0"' %t
@implementation A
-(void) im0 {
(void) ^{ return 1; }();
}
@end
@interface B : A @end
@implementation B
-(void) im1 {
^(void) { [self im0]; }();
}
-(void) im2 {
^{ [super im0]; }();
}
-(void) im3 {
^{ ^{[super im0];}(); }();
}
@end
|