blob: 354950c49c756fdfb50604a507ccaf662eb9a25e [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -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
22- (int) foo: (int)arg1 __attribute__((deprecated)){ // expected-warning {{method attribute may 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 may be specified}}
29 return 10;
30}
31@end
32