2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2008-09-30 00:51:41 +08:00
|
|
|
|
|
|
|
@interface Whatever
|
|
|
|
- copy;
|
|
|
|
@end
|
|
|
|
|
|
|
|
typedef long (^MyBlock)(id obj1, id obj2);
|
|
|
|
|
|
|
|
void foo(MyBlock b) {
|
|
|
|
id bar = [b copy];
|
|
|
|
}
|
|
|
|
|
2008-09-30 02:10:17 +08:00
|
|
|
void foo2(id b) {
|
|
|
|
}
|
|
|
|
|
|
|
|
void foo3(void (^block)(void)) {
|
|
|
|
foo2(block);
|
|
|
|
id x;
|
|
|
|
foo(x);
|
|
|
|
}
|