diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-10 18:04:25 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-10 18:04:25 +0000 |
commit | 6f9386049c6dee2df33a4b7a6dfeda2733acce7d (patch) | |
tree | f61d97f5db84062f5ef77289ff052947d02fc82d /lib/Sema/SemaDeclObjC.cpp | |
parent | 121ec0a1a903d07ca8f5eaa6976f3233795a3d20 (diff) |
More tweaking and test cases for call to super
annotations. // rdar://6386358
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 709a868582..e81429cc4c 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -388,9 +388,12 @@ void Sema::ActOnStartOfObjCMethodDef(Scope *FnBodyScope, Decl *D) { !(Context.getLangOpts().ObjCAutoRefCount || Context.getLangOpts().getGC() == LangOptions::GCOnly) && MDecl->getMethodFamily() == OMF_dealloc; - if (!getCurFunction()->ObjCShouldCallSuperDealloc) + if (!getCurFunction()->ObjCShouldCallSuperDealloc) { + IMD = IC->getSuperClass()->lookupMethod(MDecl->getSelector(), + MDecl->isInstanceMethod()); getCurFunction()->ObjCShouldCallSuperDealloc = (IMD && IMD->hasAttr<ObjCRequiresSuperAttr>()); + } getCurFunction()->ObjCShouldCallSuperFinalize = Context.getLangOpts().getGC() != LangOptions::NonGC && MDecl->getMethodFamily() == OMF_finalize; |