diff options
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 43b097d1f2..66fdc67e41 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -394,7 +394,7 @@ void Sema::ActOnStartOfObjCMethodDef(Scope *FnBodyScope, Decl *D) { // Then in ActOnSuperMessage() (SemaExprObjC), set it back to false. // Finally, in ActOnFinishFunctionBody() (SemaDecl), warn if flag is set. // Only do this if the current class actually has a superclass. - if (IC->getSuperClass()) { + if (const ObjCInterfaceDecl *SuperClass = IC->getSuperClass()) { ObjCMethodFamily Family = MDecl->getMethodFamily(); if (Family == OMF_dealloc) { if (!(getLangOpts().ObjCAutoRefCount || @@ -407,8 +407,8 @@ void Sema::ActOnStartOfObjCMethodDef(Scope *FnBodyScope, Decl *D) { } else { const ObjCMethodDecl *SuperMethod = - IC->getSuperClass()->lookupMethod(MDecl->getSelector(), - MDecl->isInstanceMethod()); + SuperClass->lookupMethod(MDecl->getSelector(), + MDecl->isInstanceMethod()); getCurFunction()->ObjCShouldCallSuper = (SuperMethod && SuperMethod->hasAttr<ObjCRequiresSuperAttr>()); } |