Have ObjCMethodDecl::getCanonicalDecl take into account redeclared methods.

llvm-svn: 142231
This commit is contained in:
Argyrios Kyrtzidis 2011-10-17 19:48:09 +00:00
parent 1f4bee5601
commit 690dccd9d4
1 changed files with 4 additions and 0 deletions

View File

@ -452,6 +452,10 @@ ObjCMethodDecl *ObjCMethodDecl::getCanonicalDecl() {
return MD;
}
if (isRedeclaration())
return cast<ObjCContainerDecl>(CtxD)->getMethod(getSelector(),
isInstanceMethod());
return this;
}