Fariborz Jahanian | b0ed95c | 2012-07-03 23:22:13 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -x objective-c++ -std=c++11 -fsyntax-only -Werror -verify -Wno-objc-root-class %s |
| 2 | // rdar://10387088 |
| 3 | |
| 4 | struct X { |
| 5 | X(); |
Fariborz Jahanian | 39700f8 | 2012-07-05 19:34:20 +0000 | [diff] [blame] | 6 | void SortWithCollator(); |
Fariborz Jahanian | b0ed95c | 2012-07-03 23:22:13 +0000 | [diff] [blame] | 7 | }; |
| 8 | |
| 9 | @interface MyClass |
| 10 | - (void)someMethod; |
| 11 | @end |
| 12 | |
| 13 | @implementation MyClass |
| 14 | - (void)someMethod { |
| 15 | [self privateMethod]; // clang already does not warn here |
| 16 | } |
| 17 | |
| 18 | int bar(MyClass * myObject) { |
| 19 | [myObject privateMethod]; |
| 20 | return gorfbar(myObject); |
| 21 | } |
| 22 | - (void)privateMethod { } |
| 23 | |
| 24 | int gorfbar(MyClass * myObject) { |
| 25 | [myObject privateMethod]; |
| 26 | [myObject privateMethod1]; |
| 27 | return getMe + bar(myObject); |
| 28 | } |
| 29 | |
| 30 | - (void)privateMethod1 { |
| 31 | getMe = getMe+1; |
| 32 | } |
| 33 | |
| 34 | static int getMe; |
| 35 | |
| 36 | static int test() { |
| 37 | return 0; |
| 38 | } |
| 39 | |
| 40 | int x{17}; |
| 41 | |
| 42 | X::X() = default; |
Fariborz Jahanian | 39700f8 | 2012-07-05 19:34:20 +0000 | [diff] [blame] | 43 | void X::SortWithCollator() {} |
Fariborz Jahanian | 090d1bd | 2012-07-20 17:19:54 +0000 | [diff] [blame] | 44 | // pr13418 |
| 45 | namespace { |
| 46 | int CurrentTabId() {return 0;} |
| 47 | } |
Fariborz Jahanian | b0ed95c | 2012-07-03 23:22:13 +0000 | [diff] [blame] | 48 | @end |