aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-29 21:51:48 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-29 21:51:48 +0000
commit04593d0f9d84f6adf942bd66f1587e05c6a47c42 (patch)
tree6fb0a8836d88db3feef6249f3a96ebb1eaff694a /lib/Sema/SemaDeclObjC.cpp
parentc58b75628c3860775fc3914aa6d08e84de82233f (diff)
When looking for overridden ObjC methods, don't ignore 'hidden' ones.
When using modules we should not ignore overridden methods from categories that are hidden because the module is not visible. This will give more consistent results (when imports change) and it's more correct since the methods are indeed overridden even if they are not "visible" for lookup purposes. rdar://13350796 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178374 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index c45968a46f..1e2e4843ba 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -2727,9 +2727,9 @@ private:
return;
// - categories,
- for (ObjCInterfaceDecl::visible_categories_iterator
- cat = iface->visible_categories_begin(),
- catEnd = iface->visible_categories_end();
+ for (ObjCInterfaceDecl::known_categories_iterator
+ cat = iface->known_categories_begin(),
+ catEnd = iface->known_categories_end();
cat != catEnd; ++cat) {
search(*cat);
}
@@ -2759,7 +2759,8 @@ private:
void search(ObjCContainerDecl *container) {
// Check for a method in this container which matches this selector.
ObjCMethodDecl *meth = container->getMethod(Method->getSelector(),
- Method->isInstanceMethod());
+ Method->isInstanceMethod(),
+ /*AllowHidden=*/true);
// If we find one, record it and bail out.
if (meth) {