brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · e8dd495 Raw
36 lines · plain
1// RUN: %clang_cc1  -fsyntax-only -fblocks -verify -Wno-objc-root-class %s2 3@protocol P4void p_foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}}5@end6 7@interface I8void 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@end13 14@interface I(CAT)15void cat_foo(void) {} // expected-warning {{function definition inside an Objective-C container is deprecated}}16@end17 18@implementation I19inline void v_imp_foo(void) {} 20@end21 22@implementation I(CAT)23void cat_imp_foo(void) {} 24@end25 26@interface PrototypeState27 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@end36