Fariborz Jahanian | 8be1ecd | 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 |
Andy Gibbs | c6e68da | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Fariborz Jahanian | 8be1ecd | 2012-07-03 23:22:13 +0000 | [diff] [blame] | 3 | // rdar://10387088 |
| 4 | |
| 5 | struct X { |
| 6 | X(); |
Fariborz Jahanian | 8de7955 | 2012-07-05 19:34:20 +0000 | [diff] [blame] | 7 | void SortWithCollator(); |
Fariborz Jahanian | 8be1ecd | 2012-07-03 23:22:13 +0000 | [diff] [blame] | 8 | }; |
| 9 | |
| 10 | @interface MyClass |
| 11 | - (void)someMethod; |
| 12 | @end |
| 13 | |
| 14 | @implementation MyClass |
| 15 | - (void)someMethod { |
| 16 | [self privateMethod]; // clang already does not warn here |
| 17 | } |
| 18 | |
| 19 | int bar(MyClass * myObject) { |
| 20 | [myObject privateMethod]; |
| 21 | return gorfbar(myObject); |
| 22 | } |
| 23 | - (void)privateMethod { } |
| 24 | |
| 25 | int gorfbar(MyClass * myObject) { |
| 26 | [myObject privateMethod]; |
| 27 | [myObject privateMethod1]; |
| 28 | return getMe + bar(myObject); |
| 29 | } |
| 30 | |
| 31 | - (void)privateMethod1 { |
| 32 | getMe = getMe+1; |
| 33 | } |
| 34 | |
| 35 | static int getMe; |
| 36 | |
| 37 | static int test() { |
| 38 | return 0; |
| 39 | } |
| 40 | |
| 41 | int x{17}; |
| 42 | |
| 43 | X::X() = default; |
Fariborz Jahanian | 8de7955 | 2012-07-05 19:34:20 +0000 | [diff] [blame] | 44 | void X::SortWithCollator() {} |
Fariborz Jahanian | deb144a | 2012-07-20 17:19:54 +0000 | [diff] [blame] | 45 | // pr13418 |
| 46 | namespace { |
| 47 | int CurrentTabId() {return 0;} |
| 48 | } |
Fariborz Jahanian | 8be1ecd | 2012-07-03 23:22:13 +0000 | [diff] [blame] | 49 | @end |