forked from OSchip/llvm-project
Remove a couple of unnecessary objc method lookups.
llvm-svn: 138815
This commit is contained in:
parent
3353017668
commit
342e08fbf1
|
@ -1485,11 +1485,10 @@ void Sema::MatchAllMethodDeclarations(const llvm::DenseSet<Selector> &InsMap,
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
ObjCMethodDecl *ImpMethodDecl =
|
ObjCMethodDecl *ImpMethodDecl =
|
||||||
IMPDecl->getInstanceMethod((*I)->getSelector());
|
IMPDecl->getInstanceMethod((*I)->getSelector());
|
||||||
ObjCMethodDecl *MethodDecl =
|
assert(CDecl->getInstanceMethod((*I)->getSelector()) &&
|
||||||
CDecl->getInstanceMethod((*I)->getSelector());
|
"Expected to find the method through lookup as well");
|
||||||
assert(MethodDecl &&
|
ObjCMethodDecl *MethodDecl = *I;
|
||||||
"MethodDecl is null in ImplMethodsVsClassMethods");
|
|
||||||
// ImpMethodDecl may be null as in a @dynamic property.
|
// ImpMethodDecl may be null as in a @dynamic property.
|
||||||
if (ImpMethodDecl) {
|
if (ImpMethodDecl) {
|
||||||
if (!WarnExactMatch)
|
if (!WarnExactMatch)
|
||||||
|
@ -1516,8 +1515,9 @@ void Sema::MatchAllMethodDeclarations(const llvm::DenseSet<Selector> &InsMap,
|
||||||
} else {
|
} else {
|
||||||
ObjCMethodDecl *ImpMethodDecl =
|
ObjCMethodDecl *ImpMethodDecl =
|
||||||
IMPDecl->getClassMethod((*I)->getSelector());
|
IMPDecl->getClassMethod((*I)->getSelector());
|
||||||
ObjCMethodDecl *MethodDecl =
|
assert(CDecl->getClassMethod((*I)->getSelector()) &&
|
||||||
CDecl->getClassMethod((*I)->getSelector());
|
"Expected to find the method through lookup as well");
|
||||||
|
ObjCMethodDecl *MethodDecl = *I;
|
||||||
if (!WarnExactMatch)
|
if (!WarnExactMatch)
|
||||||
WarnConflictingTypedMethods(ImpMethodDecl, MethodDecl,
|
WarnConflictingTypedMethods(ImpMethodDecl, MethodDecl,
|
||||||
isa<ObjCProtocolDecl>(CDecl));
|
isa<ObjCProtocolDecl>(CDecl));
|
||||||
|
|
Loading…
Reference in New Issue