summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/warn-deprecated-implementations.m
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-07-13 16:37:11 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-07-13 16:37:11 +0000
commite1088dc42b3e564b8f0f020594eacf88f70761f1 (patch)
tree98f580b8963af086f92bd4aa9fcd59aaea57f5e7 /clang/test/SemaObjC/warn-deprecated-implementations.m
parentf81d97e76323ec9bf32de995f03fafd93813aca5 (diff)
downloadbcm5719-llvm-e1088dc42b3e564b8f0f020594eacf88f70761f1.tar.gz
bcm5719-llvm-e1088dc42b3e564b8f0f020594eacf88f70761f1.zip
Extend -Wdeprecated-implementations to warn about unavailable methods
rdar://22867595 llvm-svn: 307924
Diffstat (limited to 'clang/test/SemaObjC/warn-deprecated-implementations.m')
-rw-r--r--clang/test/SemaObjC/warn-deprecated-implementations.m9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/SemaObjC/warn-deprecated-implementations.m b/clang/test/SemaObjC/warn-deprecated-implementations.m
index ed2156d9abe..440b2886f01 100644
--- a/clang/test/SemaObjC/warn-deprecated-implementations.m
+++ b/clang/test/SemaObjC/warn-deprecated-implementations.m
@@ -1,9 +1,11 @@
-// RUN: %clang_cc1 -fsyntax-only -Wdeprecated-implementations -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple=x86_64-apple-macos10.10 -fsyntax-only -Wdeprecated-implementations -verify -Wno-objc-root-class %s
// rdar://8973810
// rdar://12717705
@protocol P
- (void) D __attribute__((deprecated)); // expected-note {{method 'D' declared here}}
+
+- (void) unavailable __attribute__((__unavailable__)); // expected-note {{method 'unavailable' declared here}}
@end
@interface A <P>
@@ -18,6 +20,8 @@
+ (void)F { } // No warning, implementing its own deprecated method
- (void) D {} // expected-warning {{implementing deprecated method}}
- (void) E {} // No warning, implementing deprecated method in its class extension.
+
+- (void) unavailable { } // expected-warning {{implementing unavailable metho}}
@end
@interface A(CAT)
@@ -43,6 +47,8 @@ __attribute__((deprecated)) // expected-note {{'CL' has been explicitly marked d
@interface BASE
- (void) B __attribute__((deprecated)); // expected-note {{method 'B' declared here}}
+
++ (void) unavailable __attribute__((availability(macos, unavailable))); // expected-note {{method 'unavailable' declared here}}
@end
@interface SUB : BASE
@@ -50,6 +56,7 @@ __attribute__((deprecated)) // expected-note {{'CL' has been explicitly marked d
@implementation SUB
- (void) B {} // expected-warning {{implementing deprecated method}}
++ (void) unavailable { } // expected-warning {{implementing unavailable method}}
@end
@interface Test
OpenPOWER on IntegriCloud