Home | History | Annotate | Download | only in Edit

Lines Matching defs:Offs

48   FileOffset Offs;
49 if ((!afterToken && !canInsert(loc, Offs)) ||
50 ( afterToken && !canInsertAfterToken(loc, Offs, loc))) {
55 addInsert(loc, Offs, text, beforePreviousInsertions);
69 FileOffset Offs;
70 if ((!afterToken && !canInsert(loc, Offs)) ||
71 ( afterToken && !canInsertAfterToken(loc, Offs, loc))) {
82 addInsertFromRange(loc, Offs, RangeOffs, RangeLen, beforePreviousInsertions);
87 FileOffset Offs;
89 if (!canRemoveRange(range, Offs, Len)) {
94 addRemove(range.getBegin(), Offs, Len);
115 FileOffset Offs;
117 if (!canInsert(range.getBegin(), Offs) || !canRemoveRange(range, Offs, Len)) {
122 addRemove(range.getBegin(), Offs, Len);
123 addInsert(range.getBegin(), Offs, text, false);
165 FileOffset Offs;
167 if (!canReplaceText(loc, replacementText, Offs, Len)) {
172 addRemove(loc, Offs, Len);
173 addInsert(loc, Offs, text, false);
177 void Commit::addInsert(SourceLocation OrigLoc, FileOffset Offs, StringRef text,
185 data.Offset = Offs;
191 void Commit::addInsertFromRange(SourceLocation OrigLoc, FileOffset Offs,
200 data.Offset = Offs;
208 FileOffset Offs, unsigned Len) {
215 data.Offset = Offs;
220 bool Commit::canInsert(SourceLocation loc, FileOffset &offs) {
241 offs = FileOffset(locInfo.first, locInfo.second);
242 return canInsertInOffset(loc, offs);
245 bool Commit::canInsertAfterToken(SourceLocation loc, FileOffset &offs,
276 offs = FileOffset(locInfo.first, locInfo.second);
277 return canInsertInOffset(loc, offs);
280 bool Commit::canInsertInOffset(SourceLocation OrigLoc, FileOffset Offs) {
284 if (act.Offset.getFID() == Offs.getFID() &&
285 Offs > act.Offset && Offs < act.Offset.getWithOffset(act.Length))
292 return Editor->canInsertInOffset(OrigLoc, Offs);
296 FileOffset &Offs, unsigned &Len) {
317 Offs = FileOffset(beginInfo.first, beginInfo.second);
323 FileOffset &Offs, unsigned &Len) {
326 if (!canInsert(loc, Offs))
331 StringRef file = SourceMgr.getBufferData(Offs.getFID(), &invalidTemp);
336 return file.substr(Offs.getOffset()).startswith(text);