summaryrefslogtreecommitdiffstats
path: root/test/ARCMT
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2015-09-30 21:27:42 +0000
committerDouglas Gregor <dgregor@apple.com>2015-09-30 21:27:42 +0000
commitbd3ba161658a0472f3fee6b84684809d529b7f38 (patch)
tree05bda6052b17e4b5d430cd3edc3b74c100fe0e78 /test/ARCMT
parenta284baa10f8e446e17e484d6a2b0935548074d31 (diff)
Don't inherit availability information when implementing a protocol requirement.
When an Objective-C method implements a protocol requirement, do not inherit any availability information from the protocol requirement. Rather, check that the implementation is not less available than the protocol requirement, as we do when overriding a method that has availability. Fixes rdar://problem/22734745. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ARCMT')
-rw-r--r--test/ARCMT/checking.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ARCMT/checking.m b/test/ARCMT/checking.m
index 6a7cf76c38..11a57538d7 100644
--- a/test/ARCMT/checking.m
+++ b/test/ARCMT/checking.m
@@ -44,9 +44,9 @@ struct UnsafeS {
};
@interface A : NSObject
-- (id)retain; // expected-note {{'retain' has been explicitly marked unavailable here}}
-- (id)retainCount; // expected-note {{'retainCount' has been explicitly marked unavailable here}}
-- (id)autorelease; // expected-note 2 {{'autorelease' has been explicitly marked unavailable here}}
+- (id)retain __attribute__((unavailable)); // expected-note {{'retain' has been explicitly marked unavailable here}}
+- (id)retainCount __attribute__((unavailable)); // expected-note {{'retainCount' has been explicitly marked unavailable here}}
+- (id)autorelease __attribute__((unavailable)); // expected-note 2 {{'autorelease' has been explicitly marked unavailable here}}
- (id)init;
- (oneway void)release;
- (void)dealloc;