minix/external/bsd/llvm/dist/clang/test/SemaObjC/block-as-object.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

21 lines
302 B
Objective-C

// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
// expected-no-diagnostics
@interface Whatever
- copy;
@end
typedef long (^MyBlock)(id obj1, id obj2);
void foo(MyBlock b) {
id bar = [b copy];
}
void foo2(id b) {
}
void foo3(void (^block)(void)) {
foo2(block);
id x;
foo(x);
}