blob: 9157fcfefe114700de252380f7ff10bdf3424fa1 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -verify -fsyntax-only %s
Daniel Dunbar35682492008-09-26 04:12:28 +00002
3@class NSString;
4
5@interface A
6-t1 __attribute__((noreturn));
7- (NSString *)stringByAppendingFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2)));
Daniel Dunbard3f2c102008-10-19 02:04:16 +00008-(void) m0 __attribute__((noreturn));
9-(void) m1 __attribute__((unused));
Daniel Dunbar35682492008-09-26 04:12:28 +000010@end
Fariborz Jahanian5d36ac22009-05-12 21:36:23 +000011
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
Fariborz Jahanian09d04e52009-05-13 00:47:33 +000022- (int) foo: (int)arg1 __attribute__((deprecated)){ // expected-warning {{method attribute can only be specified}}
Fariborz Jahanian5d36ac22009-05-12 21:36:23 +000023 return 10;
24}
25- (int) foo1: (int)arg1 {
26 return 10;
27}
Fariborz Jahanian09d04e52009-05-13 00:47:33 +000028- (int) foo2: (int)arg1 __attribute__((deprecated)) { // expected-warning {{method attribute can only be specified}}
Fariborz Jahanian5d36ac22009-05-12 21:36:23 +000029 return 10;
30}
31@end
32