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