r197540 - ObjectiveC. typo fix in my last patch,
Fariborz Jahanian
fjahanian at apple.com
Tue Dec 17 16:52:55 PST 2013
Author: fjahanian
Date: Tue Dec 17 18:52:54 2013
New Revision: 197540
URL: http://llvm.org/viewvc/llvm-project?rev=197540&view=rev
Log:
ObjectiveC. typo fix in my last patch,
per Jordan's review.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/test/SemaObjC/dealloc.m
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=197540&r1=197539&r2=197540&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Dec 17 18:52:54 2013
@@ -777,7 +777,7 @@ def warn_arc_perform_selector_leaks : Wa
"performSelector may cause a leak because its selector is unknown">,
InGroup<DiagGroup<"arc-performSelector-leaks">>;
def warn_dealloc_in_category : Warning<
-"decalloc is being overridden in category">,
+"-dealloc in a category is being overridden">,
InGroup<DeallocInCategory>;
def err_gc_weak_property_strong_type : Error<
"weak attribute declared on a __strong type property in GC mode">;
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=197540&r1=197539&r2=197540&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Tue Dec 17 18:52:54 2013
@@ -3215,11 +3215,9 @@ Decl *Sema::ActOnMethodDeclaration(
}
if (isa<ObjCCategoryImplDecl>(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<DeclContext>(ClassDecl)->addDecl(ObjCMethod);
Modified: cfe/trunk/test/SemaObjC/dealloc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/dealloc.m?rev=197540&r1=197539&r2=197540&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/dealloc.m (original)
+++ cfe/trunk/test/SemaObjC/dealloc.m Tue Dec 17 18:52:54 2013
@@ -35,7 +35,7 @@
- (void)dealloc;
@end
- at implementation Subclass (CAT) // expected-note {{declared here}}
-- (void)dealloc { // expected-warning {{decalloc is being overridden in category}}
+ at implementation Subclass (CAT)
+- (void)dealloc { // expected-warning {{-dealloc in a category is being overridden}}
}
@end
More information about the cfe-commits
mailing list