1// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -Werror -verify -Wno-objc-root-class %s 2// rdar://10387088 3 4@interface MyClass 5- (void)someMethod; 6@end 7 8struct S { 9 int bar(MyClass * myObject); 10 11 int gorfbar(MyClass * myObject); 12 13 S(); 14 S(MyClass *O1, MyClass *O2); 15 S(MyClass *O1); 16 17 MyClass * Obj1, *Obj2; 18 19}; 20 21@implementation MyClass 22- (void)someMethod { 23 [self privateMethod]; // clang already does not warn here 24} 25 26int S::bar(MyClass * myObject) { 27 [myObject privateMethod]; 28 return gorfbar(myObject); 29} 30- (void)privateMethod { } 31 32int S::gorfbar(MyClass * myObject) { 33 [myObject privateMethod]; 34 [myObject privateMethod1]; 35 return getMe + bar(myObject); 36} 37 38S::S(MyClass *O1, MyClass *O2) : Obj1(O1), Obj2(O2) { 39 [O1 privateMethod]; 40 [O2 privateMethod1]; 41} 42S::S(MyClass *O1) : Obj1(O1){ Obj2 = 0; } 43 44S::S() {} 45 46- (void)privateMethod1 { 47 getMe = getMe+1; 48} 49 50static int getMe; 51 52@end 53