From 6d4740e740f9c109c76c111cc90a63f6a24f6357 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Mon, 17 Oct 2011 19:48:09 +0000 Subject: [PATCH] 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 --- lib/AST/DeclObjC.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.50.1