summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/dealloc.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-01-28 22:46:29 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-01-28 22:46:29 +0000
commit8549ec2604f3896eece840d27d7661052c8d394a (patch)
tree36ac2186494b9dcbcbd0313b39530ada73c029a6 /test/SemaObjC/dealloc.m
parent7c447ca017b674be488acbbeda972c3dfe0b5aa3 (diff)
Objective-C. Fixes a bug where "new" family attribute
was not being overridden in the category method implementation resulting in bogus warning. // rdar://15919775 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200342 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/dealloc.m')
-rw-r--r--test/SemaObjC/dealloc.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaObjC/dealloc.m b/test/SemaObjC/dealloc.m
index db89b20f5a..c1bd0b5ed4 100644
--- a/test/SemaObjC/dealloc.m
+++ b/test/SemaObjC/dealloc.m
@@ -39,3 +39,17 @@
- (void)dealloc { // expected-warning {{-dealloc is being overridden in a category}}
}
@end
+
+// rdar://15919775
+@interface NSObject @end
+@interface NSError:NSObject
+@end
+
+@interface NSError(CAT)
+- (NSError *)MCCopyAsPrimaryError __attribute__((objc_method_family(new)));
+@end
+@implementation NSError(CAT)
+- (NSError *)MCCopyAsPrimaryError {
+ return 0;
+}
+@end