1// RUN: %clang_cc1 -fsyntax-only -Wstrict-prototypes -verify -fblocks %s
2
3@interface Foo
4
5@property (nonatomic, copy) void (^noProtoBlock)(); // expected-warning {{this block declaration is not a prototype}}
6@property (nonatomic, copy) void (^block)(void); // no warning
7
8- doStuff:(void (^)()) completionHandler; // expected-warning {{this block declaration is not a prototype}}
9- doOtherStuff:(void (^)(void)) completionHandler; // no warning
10
11@end
12
13void foo() { // expected-warning {{this old-style function definition is not preceded by a prototype}}
14  void (^block)() = // expected-warning {{this block declaration is not a prototype}}
15                    ^void(int arg) { // no warning
16  };
17  void (^block2)(void) = ^void() { // no warning
18  };
19  void (^block3)(void) = ^ { // no warning
20  };
21}
22
23void (*(^(*(^block4)()) // expected-warning {{this block declaration is not a prototype}}
24     ()) // expected-warning {{this function declaration is not a prototype}}
25     ()) // expected-warning {{this block declaration is not a prototype}}
26     (); // expected-warning {{this function declaration is not a prototype}}
27