[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / deprecate_function_containers.m
blob531cf11d270427e4217ab9256d5e510d261aed2d
1 // RUN: %clang_cc1  -fsyntax-only -fblocks -verify -Wno-objc-root-class %s
2 // rdar://10414277
4 @protocol P
5 void p_foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
6 @end
8 @interface I
9 void foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
10 inline void v_foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
11 static int s_foo() {return 0; } // expected-warning {{function definition inside an Objective-C container is deprecated}}
12 static inline int si_val() { return 1; } // expected-warning {{function definition inside an Objective-C container is deprecated}}
13 @end
15 @interface I(CAT)
16 void cat_foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
17 @end
19 @implementation I
20 inline void v_imp_foo() {} 
21 @end
23 @implementation I(CAT)
24 void cat_imp_foo() {} 
25 @end
27 // rdar://16859666
28 @interface PrototypeState
30 @property (strong, readwrite) id moin1; // expected-note {{property declared here}}
32 static inline void prototype_observe_moin1(void (^callback)(id)) { // expected-warning {{function definition inside an Objective-C container is deprecated}}
33         (void)^(PrototypeState *prototypeState){
34             callback(prototypeState.moin1); // expected-error {{use of Objective-C property in function nested in Objective-C container not supported, move function outside its container}}
35         };
37 @end