aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-17 19:48:09 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-17 19:48:09 +0000
commit6d4740e740f9c109c76c111cc90a63f6a24f6357 (patch)
tree39f676aeaed87ad93091478e8aedc84236a33113 /lib/AST/DeclObjC.cpp
parentb05d7b20171bbd2feb14b059f39332cbe1bf1014 (diff)
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
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp4
1 files changed, 4 insertions, 0 deletions
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<ObjCContainerDecl>(CtxD)->getMethod(getSelector(),
+ isInstanceMethod());
+
return this;
}