Method attributes may only be specified on method
declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71597 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/method-attributes.m b/test/SemaObjC/method-attributes.m
index 003cea4..354950c 100644
--- a/test/SemaObjC/method-attributes.m
+++ b/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
+