Home | History | Annotate | Download | only in SemaObjC
      1 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -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 - unavailableMeth __attribute__((availability(macosx,unavailable)));
      7 - unavailableMeth2 __attribute__((unavailable));
      8 @end
      9 
     10 @implementation  I  // expected-warning{{incomplete implementation}}
     11 @end
     12 
     13 @implementation I(CAT)
     14 - Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
     15 @end
     16 
     17 #pragma GCC diagnostic ignored "-Wincomplete-implementation"
     18 @interface I2
     19 - Meth; // expected-note{{method 'Meth' declared here}}
     20 @end
     21 
     22 @implementation  I2
     23 @end
     24 
     25 @implementation I2(CAT)
     26 - Meth {return 0;} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
     27 @end
     28 
     29 @interface Q
     30 @end
     31 
     32 // rdar://10336158
     33 @implementation Q
     34 
     35 __attribute__((visibility("default")))
     36 @interface QN // expected-error {{Objective-C declarations may only appear in global scope}}
     37 {
     38 }
     39 @end
     40 
     41 @end
     42 
     43