Home | History | Annotate | Download | only in Edit

Lines Matching full:commit

15 #include "clang/Edit/Commit.h"
45 const NSAPI &NS, Commit &commit) {
68 commit.replaceWithInner(Msg->getSourceRange(),
80 static void maybePutParensOnReceiver(const Expr *Receiver, Commit &commit) {
84 commit.insertWrap("(", RecRange, ")");
88 static bool rewriteToSubscriptGet(const ObjCMessageExpr *Msg, Commit &commit) {
99 commit.replaceWithInner(CharSourceRange::getCharRange(MsgRange.getBegin(),
102 commit.replaceWithInner(SourceRange(ArgRange.getBegin(), MsgRange.getEnd()),
104 commit.insertWrap("[", ArgRange, "]");
105 maybePutParensOnReceiver(Rec, commit);
110 Commit &commit) {
122 commit.replaceWithInner(CharSourceRange::getCharRange(MsgRange.getBegin(),
125 commit.replaceWithInner(CharSourceRange::getCharRange(Arg0Range.getBegin(),
128 commit.replaceWithInner(SourceRange(Arg1Range.getBegin(), MsgRange.getEnd()),
130 commit.insertWrap("[", CharSourceRange::getCharRange(Arg0Range.getBegin(),
133 maybePutParensOnReceiver(Rec, commit);
138 Commit &commit) {
151 commit.insertBefore(LocBeforeVal, "] = ");
152 commit.insertFromRange(LocBeforeVal, Arg1Range, /*afterToken=*/false,
154 commit.insertBefore(LocBeforeVal, "[");
155 commit.replaceWithInner(CharSourceRange::getCharRange(MsgRange.getBegin(),
158 commit.replaceWithInner(SourceRange(Arg0Range.getBegin(), MsgRange.getEnd()),
160 maybePutParensOnReceiver(Rec, commit);
165 const NSAPI &NS, Commit &commit) {
185 return rewriteToSubscriptGet(Msg, commit);
192 return rewriteToArraySubscriptSet(Msg, commit);
196 return rewriteToDictionarySubscriptSet(Msg, commit);
206 const NSAPI &NS, Commit &commit);
208 const NSAPI &NS, Commit &commit);
210 const NSAPI &NS, Commit &commit);
213 const NSAPI &NS, Commit &commit) {
219 return rewriteToArrayLiteral(Msg, NS, commit);
221 return rewriteToDictionaryLiteral(Msg, NS, commit);
223 return rewriteToNumberLiteral(Msg, NS, commit);
233 const NSAPI &NS, Commit &commit) {
240 commit.replace(MsgRange, "@[]");
248 commit.replaceWithInner(MsgRange, ArgRange);
249 commit.insertWrap("@[", ArgRange, "]");
261 commit.replace(MsgRange, "@[]");
266 commit.replaceWithInner(MsgRange, ArgRange);
267 commit.insertWrap("@[", ArgRange, "]");
279 const NSAPI &NS, Commit &commit) {
286 commit.replace(MsgRange, "@{}");
297 commit.insertBefore(ValRange.getBegin(), ": ");
298 commit.insertFromRange(ValRange.getBegin(),
301 commit.insertBefore(ValRange.getBegin(), "@{");
302 commit.insertAfterToken(ValRange.getEnd(), "}");
303 commit.replaceWithInner(MsgRange, ValRange);
317 commit.replace(MsgRange, "@{}");
325 commit.insertAfterToken(KeyRange.getEnd(), ": ");
326 commit.insertFromRange(KeyRange.getEnd(), ValRange, /*afterToken=*/true);
327 commit.remove(CharSourceRange::getCharRange(ValRange.getBegin(),
335 commit.insertWrap("@{", ArgRange, "}");
336 commit.replaceWithInner(MsgRange, ArgRange);
349 const NSAPI &NS, Commit &commit) {
355 commit.replaceWithInner(Msg->getSourceRange(), ArgRange);
356 commit.insert(ArgRange.getBegin(), "@");
365 const NSAPI &NS, Commit &commit) {
369 commit.replaceWithInner(Msg->getSourceRange(), ArgRange);
370 commit.insert(ArgRange.getBegin(), "@");
458 const NSAPI &NS, Commit &commit) {
464 return rewriteToCharLiteral(Msg, CharE, NS, commit);
466 return rewriteToBoolLiteral(Msg, BE, NS, commit);
468 return rewriteToBoolLiteral(Msg, BE, NS, commit);
533 commit.replaceWithInner(Msg->getSourceRange(), ArgRange);
534 commit.insert(ArgRange.getBegin(), "@");
567 commit.replaceWithInner(CharSourceRange::getTokenRange(Msg->getSourceRange()),
569 commit.insert(LitB, "@");
572 commit.insert(LitE, ".0");
576 commit.insert(LitE, LitInfo.F);
579 commit.insert(LitE, LitInfo.U);
582 commit.insert(LitE, LitInfo.L);
584 commit.insert(LitE, LitInfo.LL);