1// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -Wno-objc-root-class %s 2 3@protocol P 4void p_foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}} 5@end 6 7@interface I 8void foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}} 9inline void v_foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}} 10static int s_foo(void) {return 0; } // expected-warning {{function definition inside an Objective-C container is deprecated}} 11static inline int si_val(void) { return 1; } // expected-warning {{function definition inside an Objective-C container is deprecated}} 12@end 13 14@interface I(CAT) 15void cat_foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}} 16@end 17 18@implementation I 19inline void v_imp_foo(void) {} 20@end 21 22@implementation I(CAT) 23void cat_imp_foo(void) {} 24@end 25 26@interface PrototypeState 27 28@property (strong, readwrite) id moin1; // expected-note {{property declared here}} 29 30static inline void prototype_observe_moin1(void (^callback)(id)) { // expected-warning {{function definition inside an Objective-C container is deprecated}} 31 (void)^(PrototypeState *prototypeState){ 32 callback(prototypeState.moin1); // expected-error {{use of Objective-C property in function nested in Objective-C container not supported, move function outside its container}} 33 }; 34} 35@end 36