1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -std=c++11 -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 Sambucstruct X { 6*f4a2713aSLionel SambucX(); 7*f4a2713aSLionel Sambucvoid SortWithCollator(); 8*f4a2713aSLionel Sambuc}; 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc@interface MyClass 11*f4a2713aSLionel Sambuc- (void)someMethod; 12*f4a2713aSLionel Sambuc@end 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc@implementation MyClass 15*f4a2713aSLionel Sambuc- (void)someMethod { 16*f4a2713aSLionel Sambuc [self privateMethod]; // clang already does not warn here 17*f4a2713aSLionel Sambuc} 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambucint bar(MyClass * myObject) { 20*f4a2713aSLionel Sambuc [myObject privateMethod]; 21*f4a2713aSLionel Sambuc return gorfbar(myObject); 22*f4a2713aSLionel Sambuc} 23*f4a2713aSLionel Sambuc- (void)privateMethod { } 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambucint gorfbar(MyClass * myObject) { 26*f4a2713aSLionel Sambuc [myObject privateMethod]; 27*f4a2713aSLionel Sambuc [myObject privateMethod1]; 28*f4a2713aSLionel Sambuc return getMe + bar(myObject); 29*f4a2713aSLionel Sambuc} 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc- (void)privateMethod1 { 32*f4a2713aSLionel Sambuc getMe = getMe+1; 33*f4a2713aSLionel Sambuc} 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambucstatic int getMe; 36*f4a2713aSLionel Sambuc 37*f4a2713aSLionel Sambucstatic int test() { 38*f4a2713aSLionel Sambuc return 0; 39*f4a2713aSLionel Sambuc} 40*f4a2713aSLionel Sambuc 41*f4a2713aSLionel Sambucint x{17}; 42*f4a2713aSLionel Sambuc 43*f4a2713aSLionel SambucX::X() = default; 44*f4a2713aSLionel Sambucvoid X::SortWithCollator() {} 45*f4a2713aSLionel Sambuc// pr13418 46*f4a2713aSLionel Sambucnamespace { 47*f4a2713aSLionel Sambuc int CurrentTabId() {return 0;} 48*f4a2713aSLionel Sambuc} 49*f4a2713aSLionel Sambuc@end 50