diff options
author | Stephen Kelly <steveire@gmail.com> | 2018-08-09 21:08:08 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2018-08-09 21:08:08 +0000 |
commit | d7b659b592e6aaa6659904d346a0cacfa18d1661 (patch) | |
tree | e6b7f265e398995b32ffd8352dc00cd3c837f408 /lib/Edit | |
parent | a7d278685d70b3cf693b12941cae4bba91d260d6 (diff) |
Port getLocStart -> getBeginLoc
Reviewers: teemperor!
Subscribers: jholewinski, whisperity, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D50350
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Edit')
-rw-r--r-- | lib/Edit/RewriteObjCFoundationAPI.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Edit/RewriteObjCFoundationAPI.cpp b/lib/Edit/RewriteObjCFoundationAPI.cpp index b53a70d875..1528924d5f 100644 --- a/lib/Edit/RewriteObjCFoundationAPI.cpp +++ b/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; } |