1 // RUN: %clang_cc1 -fsyntax-only -fblocks -verify -Wno-objc-root-class %s
4 void p_foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
8 void foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
9 inline void v_foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
10 static int s_foo(void) {return 0; } // expected-warning {{function definition inside an Objective-C container is deprecated}}
11 static inline int si_val(void) { return 1; } // expected-warning {{function definition inside an Objective-C container is deprecated}}
15 void cat_foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
19 inline void v_imp_foo(void) {}
22 @implementation I(CAT)
23 void cat_imp_foo(void) {}
26 @interface PrototypeState
28 @property (strong, readwrite) id moin1; // expected-note {{property declared here}}
30 static 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}}