summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/method-attributes.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/method-attributes.m')
-rw-r--r--clang/test/SemaObjC/method-attributes.m22
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
+
OpenPOWER on IntegriCloud