1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Werror -verify -Wno-objc-root-class %s 2*f4a2713aSLionel Sambuc// expected-no-diagnostics 3*f4a2713aSLionel Sambuc// rdar://10387088 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc@interface MyClass 6*f4a2713aSLionel Sambuc- (void)someMethod; 7*f4a2713aSLionel Sambuc@end 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@implementation MyClass 10*f4a2713aSLionel Sambuc- (void)someMethod { 11*f4a2713aSLionel Sambuc [self privateMethod]; // clang already does not warn here 12*f4a2713aSLionel Sambuc} 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambucint bar(MyClass * myObject) { 15*f4a2713aSLionel Sambuc [myObject privateMethod]; 16*f4a2713aSLionel Sambuc return gorfbar(myObject); 17*f4a2713aSLionel Sambuc} 18*f4a2713aSLionel Sambuc- (void)privateMethod { } 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambucint gorfbar(MyClass * myObject) { 21*f4a2713aSLionel Sambuc [myObject privateMethod]; 22*f4a2713aSLionel Sambuc [myObject privateMethod1]; 23*f4a2713aSLionel Sambuc return getMe + bar(myObject); 24*f4a2713aSLionel Sambuc} 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambucint KR(myObject) 27*f4a2713aSLionel SambucMyClass * myObject; 28*f4a2713aSLionel Sambuc{ 29*f4a2713aSLionel Sambuc [myObject privateMethod]; 30*f4a2713aSLionel Sambuc [myObject privateMethod1]; 31*f4a2713aSLionel Sambuc return getMe + bar(myObject); 32*f4a2713aSLionel Sambuc} 33*f4a2713aSLionel Sambuc 34*f4a2713aSLionel Sambuc- (void)privateMethod1 { 35*f4a2713aSLionel Sambuc getMe = getMe+1; 36*f4a2713aSLionel Sambuc} 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambucstatic int getMe; 39*f4a2713aSLionel Sambuc 40*f4a2713aSLionel Sambucstatic int test() { 41*f4a2713aSLionel Sambuc return 0; 42*f4a2713aSLionel Sambuc} 43*f4a2713aSLionel Sambuc 44*f4a2713aSLionel Sambuc@end 45