From 0e19df9495556553be026e8c0499ea2b67dc5ba6 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 18 Dec 2013 00:52:54 +0000 Subject: [PATCH] ObjectiveC. typo fix in my last patch, per Jordan's review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197540 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticSemaKinds.td | 2 +- lib/Sema/SemaDeclObjC.cpp | 4 +--- test/SemaObjC/dealloc.m | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index d257e17501..3584569911 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -777,7 +777,7 @@ def warn_arc_perform_selector_leaks : Warning< "performSelector may cause a leak because its selector is unknown">, InGroup>; def warn_dealloc_in_category : Warning< -"decalloc is being overridden in category">, +"-dealloc in a category is being overridden">, InGroup; def err_gc_weak_property_strong_type : Error< "weak attribute declared on a __strong type property in GC mode">; diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index d536f33c08..078a0e3ab9 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -3215,11 +3215,9 @@ Decl *Sema::ActOnMethodDeclaration( } if (isa(ImpDecl)) { ObjCMethodFamily family = ObjCMethod->getMethodFamily(); - if (family == OMF_dealloc && IMD && IMD->isOverriding()) { + if (family == OMF_dealloc && IMD && IMD->isOverriding()) Diag(ObjCMethod->getLocation(), diag::warn_dealloc_in_category) << ObjCMethod->getDeclName(); - Diag(ImpDecl->getLocation(), diag::note_declared_at); - } } } else { cast(ClassDecl)->addDecl(ObjCMethod); diff --git a/test/SemaObjC/dealloc.m b/test/SemaObjC/dealloc.m index 4e61424e68..a5d34e1f52 100644 --- a/test/SemaObjC/dealloc.m +++ b/test/SemaObjC/dealloc.m @@ -35,7 +35,7 @@ - (void)dealloc; @end -@implementation Subclass (CAT) // expected-note {{declared here}} -- (void)dealloc { // expected-warning {{decalloc is being overridden in category}} +@implementation Subclass (CAT) +- (void)dealloc { // expected-warning {{-dealloc in a category is being overridden}} } @end -- 2.40.0