Fariborz Jahanian | 6c89eaf | 2012-07-02 23:37:09 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -Werror -verify -Wno-objc-root-class %s |
| 2 | // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -Werror -verify -Wno-objc-root-class %s |
| 3 | // rdar://10387088 |
| 4 | |
| 5 | @interface MyClass |
| 6 | - (void)someMethod; |
| 7 | @end |
| 8 | |
| 9 | @implementation MyClass |
| 10 | - (void)someMethod { |
| 11 | [self privateMethod]; // clang already does not warn here |
| 12 | } |
| 13 | |
| 14 | int bar(MyClass * myObject) { |
| 15 | [myObject privateMethod]; |
| 16 | return gorfbar(myObject); |
| 17 | } |
| 18 | - (void)privateMethod { } |
| 19 | |
| 20 | int gorfbar(MyClass * myObject) { |
| 21 | [myObject privateMethod]; |
| 22 | [myObject privateMethod1]; |
| 23 | return getMe + bar(myObject); |
| 24 | } |
| 25 | |
| 26 | - (void)privateMethod1 { |
| 27 | getMe = getMe+1; |
| 28 | } |
| 29 | |
| 30 | static int getMe; |
| 31 | |
Fariborz Jahanian | 3b5f9dc | 2012-07-03 22:54:28 +0000 | [diff] [blame] | 32 | static int test() { |
| 33 | return 0; |
| 34 | } |
| 35 | |
Fariborz Jahanian | 6c89eaf | 2012-07-02 23:37:09 +0000 | [diff] [blame] | 36 | @end |