Remove a couple of unnecessary objc method lookups.

llvm-svn: 138815
This commit is contained in:
Argyrios Kyrtzidis 2011-08-30 19:43:21 +00:00
parent 3353017668
commit 342e08fbf1
1 changed files with 7 additions and 7 deletions

View File

@ -1485,11 +1485,10 @@ void Sema::MatchAllMethodDeclarations(const llvm::DenseSet<Selector> &InsMap,
continue;
} else {
ObjCMethodDecl *ImpMethodDecl =
IMPDecl->getInstanceMethod((*I)->getSelector());
ObjCMethodDecl *MethodDecl =
CDecl->getInstanceMethod((*I)->getSelector());
assert(MethodDecl &&
"MethodDecl is null in ImplMethodsVsClassMethods");
IMPDecl->getInstanceMethod((*I)->getSelector());
assert(CDecl->getInstanceMethod((*I)->getSelector()) &&
"Expected to find the method through lookup as well");
ObjCMethodDecl *MethodDecl = *I;
// ImpMethodDecl may be null as in a @dynamic property.
if (ImpMethodDecl) {
if (!WarnExactMatch)
@ -1516,8 +1515,9 @@ void Sema::MatchAllMethodDeclarations(const llvm::DenseSet<Selector> &InsMap,
} else {
ObjCMethodDecl *ImpMethodDecl =
IMPDecl->getClassMethod((*I)->getSelector());
ObjCMethodDecl *MethodDecl =
CDecl->getClassMethod((*I)->getSelector());
assert(CDecl->getClassMethod((*I)->getSelector()) &&
"Expected to find the method through lookup as well");
ObjCMethodDecl *MethodDecl = *I;
if (!WarnExactMatch)
WarnConflictingTypedMethods(ImpMethodDecl, MethodDecl,
isa<ObjCProtocolDecl>(CDecl));