2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -verify -fsyntax-only %s
|
2008-09-26 12:12:28 +08:00
|
|
|
|
|
|
|
@class NSString;
|
|
|
|
|
|
|
|
@interface A
|
|
|
|
-t1 __attribute__((noreturn));
|
|
|
|
- (NSString *)stringByAppendingFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2)));
|
2008-10-19 10:04:16 +08:00
|
|
|
-(void) m0 __attribute__((noreturn));
|
|
|
|
-(void) m1 __attribute__((unused));
|
2008-09-26 12:12:28 +08:00
|
|
|
@end
|
2009-05-13 05:36:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
@interface INTF
|
|
|
|
- (int) foo1: (int)arg1 __attribute__((deprecated));
|
|
|
|
|
|
|
|
- (int) foo: (int)arg1;
|
|
|
|
|
|
|
|
- (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable));
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF
|
2009-05-13 08:47:33 +08:00
|
|
|
- (int) foo: (int)arg1 __attribute__((deprecated)){ // expected-warning {{method attribute can only be specified}}
|
2009-05-13 05:36:23 +08:00
|
|
|
return 10;
|
|
|
|
}
|
|
|
|
- (int) foo1: (int)arg1 {
|
|
|
|
return 10;
|
|
|
|
}
|
2009-05-13 08:47:33 +08:00
|
|
|
- (int) foo2: (int)arg1 __attribute__((deprecated)) { // expected-warning {{method attribute can only be specified}}
|
2009-05-13 05:36:23 +08:00
|
|
|
return 10;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|