Home | History | Annotate | Download | only in SemaObjC
      1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
      2 
      3 @interface I
      4 - Meth; // expected-note{{method definition for 'Meth' not found}} \
      5         // expected-note{{method 'Meth' declared here}}
      6 @end
      7 
      8 @implementation  I  // expected-warning{{incomplete implementation}}
      9 @end
     10 
     11 @implementation I(CAT)
     12 - Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
     13 @end
     14 
     15 #pragma GCC diagnostic ignored "-Wincomplete-implementation"
     16 @interface I2
     17 - Meth; // expected-note{{method 'Meth' declared here}}
     18 @end
     19 
     20 @implementation  I2
     21 @end
     22 
     23 @implementation I2(CAT)
     24 - Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
     25 @end
     26 
     27 @interface Q
     28 @end
     29 
     30 // rdar://10336158
     31 @implementation Q
     32 
     33 __attribute__((visibility("default")))
     34 @interface QN // expected-error {{Objective-C declarations may only appear in global scope}}
     35 {
     36 }
     37 @end
     38 
     39 @end
     40 
     41