Fariborz Jahanian | 3451df8 | 2014-05-28 17:02:35 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
| 2 | // rdar://10414277 |
| 3 | |
| 4 | @protocol P |
| 5 | void p_foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}} |
| 6 | @end |
| 7 | |
| 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 |
| 14 | |
| 15 | @interface I(CAT) |
| 16 | void cat_foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}} |
| 17 | @end |
| 18 | |
| 19 | @implementation I |
| 20 | inline void v_imp_foo() {} |
| 21 | @end |
| 22 | |
| 23 | @implementation I(CAT) |
| 24 | void cat_imp_foo() {} |
| 25 | @end |