aboutsummaryrefslogtreecommitdiff
path: root/lib/Edit/RewriteObjCFoundationAPI.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-06-19 02:22:02 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-06-19 02:22:02 +0000
commit12b732a86cc2320dd6bc8fd7ef027b619c554f7e (patch)
tree8da4b6b48a1767fa330981fbb37c68af58012e13 /lib/Edit/RewriteObjCFoundationAPI.cpp
parent8af669f2f1d92436fe6dc43144bb084a620e7516 (diff)
[objcmt] When checking whether the subscripting methods are declared use
ObjCInterfaceDec::lookupInstanceMethod to make sure we check categories as well and update related tests. rdar://11695288 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Edit/RewriteObjCFoundationAPI.cpp')
-rw-r--r--lib/Edit/RewriteObjCFoundationAPI.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Edit/RewriteObjCFoundationAPI.cpp b/lib/Edit/RewriteObjCFoundationAPI.cpp
index 465f18051a..feecc70ec1 100644
--- a/lib/Edit/RewriteObjCFoundationAPI.cpp
+++ b/lib/Edit/RewriteObjCFoundationAPI.cpp
@@ -128,7 +128,7 @@ static bool rewriteToArraySubscriptGet(const ObjCInterfaceDecl *IFace,
const ObjCMessageExpr *Msg,
const NSAPI &NS,
Commit &commit) {
- if (!IFace->getInstanceMethod(NS.getObjectAtIndexedSubscriptSelector()))
+ if (!IFace->lookupInstanceMethod(NS.getObjectAtIndexedSubscriptSelector()))
return false;
return rewriteToSubscriptGetCommon(Msg, commit);
}
@@ -137,7 +137,7 @@ static bool rewriteToDictionarySubscriptGet(const ObjCInterfaceDecl *IFace,
const ObjCMessageExpr *Msg,
const NSAPI &NS,
Commit &commit) {
- if (!IFace->getInstanceMethod(NS.getObjectForKeyedSubscriptSelector()))
+ if (!IFace->lookupInstanceMethod(NS.getObjectForKeyedSubscriptSelector()))
return false;
return rewriteToSubscriptGetCommon(Msg, commit);
}
@@ -151,7 +151,7 @@ static bool rewriteToArraySubscriptSet(const ObjCInterfaceDecl *IFace,
const Expr *Rec = Msg->getInstanceReceiver();
if (!Rec)
return false;
- if (!IFace->getInstanceMethod(NS.getSetObjectAtIndexedSubscriptSelector()))
+ if (!IFace->lookupInstanceMethod(NS.getSetObjectAtIndexedSubscriptSelector()))
return false;
SourceRange MsgRange = Msg->getSourceRange();
@@ -183,7 +183,7 @@ static bool rewriteToDictionarySubscriptSet(const ObjCInterfaceDecl *IFace,
const Expr *Rec = Msg->getInstanceReceiver();
if (!Rec)
return false;
- if (!IFace->getInstanceMethod(NS.getSetObjectForKeyedSubscriptSelector()))
+ if (!IFace->lookupInstanceMethod(NS.getSetObjectForKeyedSubscriptSelector()))
return false;
SourceRange MsgRange = Msg->getSourceRange();