diff options
| author | Ted Kremenek <kremenek@apple.com> | 2011-09-28 19:32:29 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2011-09-28 19:32:29 +0000 |
| commit | 3f443a71dc604e96034da5b5d6b6cd20f41d26fc (patch) | |
| tree | 814f318fb3f9957e896b3b4ea3d64ce5c90c7234 /clang/lib/Sema | |
| parent | 3714065a9412a1bee3c2d8931720940e5fe172da (diff) | |
| download | bcm5719-llvm-3f443a71dc604e96034da5b5d6b6cd20f41d26fc.tar.gz bcm5719-llvm-3f443a71dc604e96034da5b5d6b6cd20f41d26fc.zip | |
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.
llvm-svn: 140713
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 0822edf7049..f1a26370775 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/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; } } |

