aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-09-28 19:32:29 +0000
committerTed Kremenek <kremenek@apple.com>2011-09-28 19:32:29 +0000
commit8cd8de4c0fb5f3e86dbbde5844903136c5e0e046 (patch)
treec7e52cd73472c3039697d8f92248d5b81d90e0ea /lib/Sema/SemaDeclObjC.cpp
parent440ec2ebbe2e7aa2a5f733a41cf845d354d16e23 (diff)
Tweak -Wobjc-missing-super-calls to not warning about missing [super dealloc] when in GC-only mode, and to not warning about missing [super finalize] when not using GC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 0822edf704..f1a2637077 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -335,10 +335,11 @@ void Sema::ActOnStartOfObjCMethodDef(Scope *FnBodyScope, Decl *D) {
// Only do this if the current class actually has a superclass.
if (IC->getSuperClass()) {
ObjCShouldCallSuperDealloc =
- !Context.getLangOptions().ObjCAutoRefCount &&
+ !(Context.getLangOptions().ObjCAutoRefCount ||
+ Context.getLangOptions().getGC() == LangOptions::GCOnly) &&
MDecl->getMethodFamily() == OMF_dealloc;
ObjCShouldCallSuperFinalize =
- !Context.getLangOptions().ObjCAutoRefCount &&
+ Context.getLangOptions().getGC() != LangOptions::NonGC &&
MDecl->getMethodFamily() == OMF_finalize;
}
}