From: Argyrios Kyrtzidis Date: Mon, 17 Oct 2011 19:48:09 +0000 (+0000) Subject: Have ObjCMethodDecl::getCanonicalDecl take into account redeclared methods. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d4740e740f9c109c76c111cc90a63f6a24f6357;p=clang Have ObjCMethodDecl::getCanonicalDecl take into account redeclared methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142231 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 5af3cf5990..0481f9cdf5 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -452,6 +452,10 @@ ObjCMethodDecl *ObjCMethodDecl::getCanonicalDecl() { return MD; } + if (isRedeclaration()) + return cast(CtxD)->getMethod(getSelector(), + isInstanceMethod()); + return this; }