Home | History | Annotate | Download | only in SemaObjC
      1 // RUN: %clang_cc1 -verify -fsyntax-only %s
      2 
      3 @class NSString;
      4 
      5 @interface A
      6 -t1 __attribute__((noreturn));
      7 - (NSString *)stringByAppendingFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2)));
      8 -(void) m0 __attribute__((noreturn));
      9 -(void) m1 __attribute__((unused));
     10 @end
     11 
     12 
     13 @interface INTF
     14 - (int) foo1: (int)arg1 __attribute__((deprecated));
     15 
     16 - (int) foo: (int)arg1; 
     17 
     18 - (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable));
     19 @end
     20 
     21 @implementation INTF
     22 - (int) foo: (int)arg1  __attribute__((deprecated)){ // expected-warning {{method attribute can only be specified}}
     23         return 10;
     24 }
     25 - (int) foo1: (int)arg1 {
     26         return 10;
     27 }
     28 - (int) foo2: (int)arg1 __attribute__((deprecated)) {  // expected-warning {{method attribute can only be specified}}
     29         return 10;
     30 }
     31 @end
     32 
     33