summaryrefslogtreecommitdiffstats
path: root/clang/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
commita3fcbeb908158e823223be291cb166357aed6853 (patch)
treef766e16aaa6977f030aee5c756e214804da1d0a0 /clang/lib/Edit/RewriteObjCFoundationAPI.cpp
parent31567515edf127b49e60a769527faf7b41c075ea (diff)
downloadbcm5719-llvm-a3fcbeb908158e823223be291cb166357aed6853.tar.gz
bcm5719-llvm-a3fcbeb908158e823223be291cb166357aed6853.zip
[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 llvm-svn: 158697
Diffstat (limited to 'clang/lib/Edit/RewriteObjCFoundationAPI.cpp')
-rw-r--r--clang/lib/Edit/RewriteObjCFoundationAPI.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp b/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
index 465f18051aa..feecc70ec14 100644
--- a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud