diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-03-05 01:27:54 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-03-05 01:27:54 +0000 |
commit | 41f3f3a4792f46787632fdb94f952f6b3ce3f4ae (patch) | |
tree | 9b3e3d5403a69659df2ddc9efa87ce2b22094074 /lib/Sema/SemaDeclObjC.cpp | |
parent | 2a268f2629b49958427e8eb02f2c3d565be71acc (diff) |
Silence a number of static analyzer warnings with assertions and such.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176469 91177308-0d34-0410-b5e6-96231b3b80d8
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>()); } |