diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-12-17 22:44:28 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-12-17 22:44:28 +0000 |
commit | c922df97b67e69cd78697adf55f4f7b17480e3d8 (patch) | |
tree | 6454c6def44b40bdb058fa845261d10ae1e1065c /test/SemaObjC/dealloc.m | |
parent | bd28dd97f68b177ff825ca38e59013a7a40f8b2e (diff) |
Objctive-C. warn if dealloc is being overridden in
a category implementation. // rdar://15397430
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/dealloc.m')
-rw-r--r-- | test/SemaObjC/dealloc.m | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/test/SemaObjC/dealloc.m b/test/SemaObjC/dealloc.m index 59218d2d07..4e61424e68 100644 --- a/test/SemaObjC/dealloc.m +++ b/test/SemaObjC/dealloc.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -verify %s -// RUN: not %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -Wdealloc-in-category -verify %s +// RUN: not %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -Wdealloc-in-category -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s // rdar://11987838 @protocol NSObject @@ -23,3 +23,19 @@ @end +// rdar://15397430 +@interface Base +- (void)dealloc; +@end + +@interface Subclass : Base +@end + +@interface Subclass (CAT) +- (void)dealloc; +@end + +@implementation Subclass (CAT) // expected-note {{declared here}} +- (void)dealloc { // expected-warning {{decalloc is being overridden in category}} +} +@end |