summaryrefslogtreecommitdiff
path: root/test/SemaObjC/attr-deprecated.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-11-13 22:27:05 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-11-13 22:27:05 +0000
commit5a9e57002331c7c566e38ee750d50cac1babc18f (patch)
treedd655bde4b9abfc2aeefeff31739d599cf2c98f3 /test/SemaObjC/attr-deprecated.m
parent773d19cce43a660639a26fca94ca387c2faf4d39 (diff)
downloadclang-5a9e57002331c7c566e38ee750d50cac1babc18f.tar.gz
Objective-C. Fixes a regression caused by implementation
of new warning for deprecated method call for receiver of type 'id'. This addresses rdar://18960378 where unintended warnings being issued. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/attr-deprecated.m')
-rw-r--r--test/SemaObjC/attr-deprecated.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m
index d98fec1764..4d54d5da05 100644
--- a/test/SemaObjC/attr-deprecated.m
+++ b/test/SemaObjC/attr-deprecated.m
@@ -238,3 +238,23 @@ const char * func() {
return [PID cString]; // expected-warning {{'cString' is deprecated: first deprecated in OS X 10.4}}
}
+// rdar://18960378
+@interface NSObject
++ (instancetype)alloc;
+- (instancetype)init;
+@end
+
+@interface NSLocale
+- (instancetype)init __attribute__((unavailable));
+@end
+
+@interface PLBatteryProperties : NSObject
++ (id)properties;
+@end
+
+@implementation PLBatteryProperties
++ (id)properties {
+ return [[self alloc] init];
+}
+@end
+