diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2009-05-12 21:36:23 +0000 | 
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-05-12 21:36:23 +0000 | 
| commit | 2bd617c46c6e8a8940214bd0afe64a52b4fc59e8 (patch) | |
| tree | 28257bfb5047fb33e6f4394731f18f038559d1b3 /clang/test/SemaObjC/method-attributes.m | |
| parent | 2399628cea7b5e1aa9836a9077ce00ee2f76187a (diff) | |
| download | bcm5719-llvm-2bd617c46c6e8a8940214bd0afe64a52b4fc59e8.tar.gz bcm5719-llvm-2bd617c46c6e8a8940214bd0afe64a52b4fc59e8.zip | |
Method attributes may only be specified on method
declarations.
llvm-svn: 71597
Diffstat (limited to 'clang/test/SemaObjC/method-attributes.m')
| -rw-r--r-- | clang/test/SemaObjC/method-attributes.m | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/clang/test/SemaObjC/method-attributes.m b/clang/test/SemaObjC/method-attributes.m index 003cea4bd70..354950c49c7 100644 --- a/clang/test/SemaObjC/method-attributes.m +++ b/clang/test/SemaObjC/method-attributes.m @@ -8,3 +8,25 @@  -(void) m0 __attribute__((noreturn));  -(void) m1 __attribute__((unused));  @end + + +@interface INTF +- (int) foo1: (int)arg1 __attribute__((deprecated)); + +- (int) foo: (int)arg1;  + +- (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)); +@end + +@implementation INTF +- (int) foo: (int)arg1  __attribute__((deprecated)){ // expected-warning {{method attribute may be specified}} +        return 10; +} +- (int) foo1: (int)arg1 { +        return 10; +} +- (int) foo2: (int)arg1 __attribute__((deprecated)) {  // expected-warning {{method attribute may be specified}} +        return 10; +} +@end + | 

