1 // RUN: %clang_cc1 -x objective-c++ -std=c++11 -fsyntax-only -Werror -verify -Wno-objc-root-class %s 2 // expected-no-diagnostics 3 // rdar://10387088 4 5 struct X { 6 X(); 7 void SortWithCollator(); 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; 44 void X::SortWithCollator() {} 45 // pr13418 46 namespace { 47 int CurrentTabId() {return 0;} 48 } 49 @end 50