summaryrefslogtreecommitdiffstats
path: root/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2018-08-09 21:08:08 +0000
committerStephen Kelly <steveire@gmail.com>2018-08-09 21:08:08 +0000
commitf2ceec4811c3587056344dd5ef8d819261e256ad (patch)
treee3d713a6806e8f9b334df4a7083d82dfc5c06d79 /clang/lib/Edit/RewriteObjCFoundationAPI.cpp
parenta6e4358f071e18aa969c0ae820745510b3581aff (diff)
downloadbcm5719-llvm-f2ceec4811c3587056344dd5ef8d819261e256ad.tar.gz
bcm5719-llvm-f2ceec4811c3587056344dd5ef8d819261e256ad.zip
Port getLocStart -> getBeginLoc
Reviewers: teemperor! Subscribers: jholewinski, whisperity, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50350 llvm-svn: 339385
Diffstat (limited to 'clang/lib/Edit/RewriteObjCFoundationAPI.cpp')
-rw-r--r--clang/lib/Edit/RewriteObjCFoundationAPI.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp b/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
index b53a70d8758..1528924d5f6 100644
--- a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
+++ b/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
@@ -420,8 +420,8 @@ static bool rewriteToArrayLiteral(const ObjCMessageExpr *Msg,
commit.replace(MsgRange, "@[]");
return true;
}
- SourceRange ArgRange(Msg->getArg(0)->getLocStart(),
- Msg->getArg(Msg->getNumArgs()-2)->getLocEnd());
+ SourceRange ArgRange(Msg->getArg(0)->getBeginLoc(),
+ Msg->getArg(Msg->getNumArgs() - 2)->getLocEnd());
commit.replaceWithInner(MsgRange, ArgRange);
commit.insertWrap("@[", ArgRange, "]");
return true;
@@ -550,8 +550,8 @@ static bool rewriteToDictionaryLiteral(const ObjCMessageExpr *Msg,
// Range of arguments up until and including the last key.
// The sentinel and first value are cut off, the value will move after the
// key.
- SourceRange ArgRange(Msg->getArg(1)->getLocStart(),
- Msg->getArg(SentinelIdx-1)->getLocEnd());
+ SourceRange ArgRange(Msg->getArg(1)->getBeginLoc(),
+ Msg->getArg(SentinelIdx - 1)->getLocEnd());
commit.insertWrap("@{", ArgRange, "}");
commit.replaceWithInner(MsgRange, ArgRange);
return true;
@@ -591,8 +591,7 @@ static bool rewriteToDictionaryLiteral(const ObjCMessageExpr *Msg,
}
// Range of arguments up until and including the last key.
// The first value is cut off, the value will move after the key.
- SourceRange ArgRange(Keys.front()->getLocStart(),
- Keys.back()->getLocEnd());
+ SourceRange ArgRange(Keys.front()->getBeginLoc(), Keys.back()->getLocEnd());
commit.insertWrap("@{", ArgRange, "}");
commit.replaceWithInner(MsgRange, ArgRange);
return true;
@@ -1131,7 +1130,7 @@ static bool doRewriteToUTF8StringBoxedExpressionHelper(
if (const StringLiteral *
StrE = dyn_cast<StringLiteral>(OrigArg->IgnoreParens())) {
commit.replaceWithInner(Msg->getSourceRange(), StrE->getSourceRange());
- commit.insert(StrE->getLocStart(), "@");
+ commit.insert(StrE->getBeginLoc(), "@");
return true;
}
OpenPOWER on IntegriCloud