blob: cbb01a1f7b2156dbd3c2b7c1f9af72bc7fe7ad0d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// RUN: %clang_cc1 -fsyntax-only -Wstrict-prototypes -verify -fblocks %s
@interface Foo
@property (nonatomic, copy) void (^noProtoBlock)(); // expected-warning {{this function declaration is not a prototype}}
@property (nonatomic, copy) void (^block)(void); // no warning
- doStuff:(void (^)()) completionHandler; // expected-warning {{this function declaration is not a prototype}}
- doOtherStuff:(void (^)(void)) completionHandler; // no warning
@end
void foo() {
void (^block)() = // expected-warning {{this function declaration is not a prototype}}
^void(int arg) { // no warning
};
void (^block2)(void) = // no warning
^void() { // expected-warning {{this function declaration is not a prototype}}
};
}
|