diff options
author | Nico Weber <nicolasweber@gmx.de> | 2011-08-29 22:59:14 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2011-08-29 22:59:14 +0000 |
commit | 27f0776caf8c0d0870eb0125a13a613603848203 (patch) | |
tree | dc4dcd564836968bd70720d76b4718c131be7f80 | |
parent | f619cdc13267625a6c63aedc9ba4b52bdb40a3b9 (diff) |
Do not warn about [super finalize] in arc mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138776 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 4 | ||||
-rw-r--r-- | test/SemaObjC/warn-missing-super.m | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 11bcb4f083..ef978f0730 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -297,7 +297,9 @@ void Sema::ActOnStartOfObjCMethodDef(Scope *FnBodyScope, Decl *D) { ObjCShouldCallSuperDealloc = !Context.getLangOptions().ObjCAutoRefCount && MDecl->getMethodFamily() == OMF_dealloc; - ObjCShouldCallSuperFinalize = MDecl->getMethodFamily() == OMF_finalize; + ObjCShouldCallSuperFinalize = + !Context.getLangOptions().ObjCAutoRefCount && + MDecl->getMethodFamily() == OMF_finalize; } } } diff --git a/test/SemaObjC/warn-missing-super.m b/test/SemaObjC/warn-missing-super.m index ff0c415872..c25a691662 100644 --- a/test/SemaObjC/warn-missing-super.m +++ b/test/SemaObjC/warn-missing-super.m @@ -45,6 +45,5 @@ // CHECK: 2 warnings generated. // RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-arc %s 2>&1 | FileCheck --check-prefix=CHECK-ARC %s -// CHECK-ARC: warn-missing-super.m:25:1: warning: method possibly missing a [super finalize] call // CHECK-ARC: warn-missing-super.m:35:4: error: ARC forbids explicit message send of 'dealloc' -// CHECK-ARC: 1 warning and 1 error generated. +// CHECK-ARC: 1 error generated. |