Lines Matching full:range
22 /// with applyRewrites(). E.g. if the same source range
63 /// A range to remove. It is a character range.
67 CharRange(CharSourceRange range, SourceManager &srcMgr, Preprocessor &PP) { in CharRange()
68 SourceLocation beginLoc = range.getBegin(), endLoc = range.getEnd(); in CharRange()
70 if (range.isTokenRange()) { in CharRange()
135 void remove(SourceRange range);
137 void replace(SourceRange range, StringRef text);
138 void replace(SourceRange range, SourceRange replacementRange);
142 void increaseIndentation(SourceRange range,
145 bool clearDiagnostic(ArrayRef<unsigned> IDs, SourceRange range);
152 bool canRemoveRange(SourceRange range);
153 bool canReplaceRange(SourceRange range, SourceRange replacementRange);
158 void commitRemove(SourceRange range);
160 void commitReplace(SourceRange range, SourceRange replacementRange);
163 void commitIncreaseIndentation(SourceRange range,SourceLocation parentIndent);
164 void commitClearDiagnostic(ArrayRef<unsigned> IDs, SourceRange range);
166 void addRemoval(CharSourceRange range);
304 void TransformActionsImpl::remove(SourceRange range) { in remove() argument
308 data.R1 = range; in remove()
322 void TransformActionsImpl::replace(SourceRange range, StringRef text) { in replace() argument
325 remove(range); in replace()
326 insert(range.getBegin(), text); in replace()
329 void TransformActionsImpl::replace(SourceRange range, in replace() argument
334 data.R1 = range; in replace()
358 void TransformActionsImpl::increaseIndentation(SourceRange range, in increaseIndentation() argument
360 if (range.isInvalid()) return; in increaseIndentation()
364 data.R1 = range; in increaseIndentation()
370 SourceRange range) { in clearDiagnostic() argument
372 if (!CapturedDiags.hasDiagnostic(IDs, range)) in clearDiagnostic()
377 data.R1 = range; in clearDiagnostic()
409 bool TransformActionsImpl::canRemoveRange(SourceRange range) { in canRemoveRange() argument
410 return canInsert(range.getBegin()) && canInsertAfterToken(range.getEnd()); in canRemoveRange()
413 bool TransformActionsImpl::canReplaceRange(SourceRange range, in canReplaceRange() argument
415 return canRemoveRange(range) && canRemoveRange(replacementRange); in canReplaceRange()
446 void TransformActionsImpl::commitRemove(SourceRange range) { in commitRemove() argument
447 addRemoval(CharSourceRange::getTokenRange(range)); in commitRemove()
464 void TransformActionsImpl::commitReplace(SourceRange range, in commitReplace() argument
466 RangeComparison comp = CharRange::compare(replacementRange, range, in commitReplace()
471 if (range.getBegin() != replacementRange.getBegin()) in commitReplace()
472 addRemoval(CharSourceRange::getCharRange(range.getBegin(), in commitReplace()
474 if (replacementRange.getEnd() != range.getEnd()) in commitReplace()
478 range.getEnd())); in commitReplace()
492 void TransformActionsImpl::commitIncreaseIndentation(SourceRange range, in commitIncreaseIndentation() argument
496 std::make_pair(CharRange(CharSourceRange::getTokenRange(range), in commitIncreaseIndentation()
502 SourceRange range) { in commitClearDiagnostic() argument
503 CapturedDiags.clearDiagnostic(IDs, range); in commitClearDiagnostic()
519 void TransformActionsImpl::addRemoval(CharSourceRange range) { in addRemoval() argument
520 CharRange newRange(range, Ctx.getSourceManager(), PP); in addRemoval()
569 CharSourceRange range = CharSourceRange::getCharRange(I->first.Begin, in applyRewrites() local
571 receiver.increaseIndentation(range, I->second); in applyRewrites()
576 CharSourceRange range = CharSourceRange::getCharRange(I->Begin, I->End); in applyRewrites() local
577 receiver.remove(range); in applyRewrites()
638 void TransformActions::remove(SourceRange range) { in remove() argument
639 static_cast<TransformActionsImpl*>(Impl)->remove(range); in remove()
646 void TransformActions::replace(SourceRange range, StringRef text) { in replace() argument
647 static_cast<TransformActionsImpl*>(Impl)->replace(range, text); in replace()
650 void TransformActions::replace(SourceRange range, in replace() argument
652 static_cast<TransformActionsImpl*>(Impl)->replace(range, replacementRange); in replace()
665 void TransformActions::increaseIndentation(SourceRange range, in increaseIndentation() argument
667 static_cast<TransformActionsImpl*>(Impl)->increaseIndentation(range, in increaseIndentation()
672 SourceRange range) { in clearDiagnostic() argument
673 return static_cast<TransformActionsImpl*>(Impl)->clearDiagnostic(IDs, range); in clearDiagnostic()
681 SourceRange range) { in report() argument
684 return Diags.Report(loc, diagId) << range; in report()
688 SourceRange range) { in reportError() argument
689 report(loc, diag::err_mt_message, range) << message; in reportError()
693 SourceRange range) { in reportWarning() argument
694 report(loc, diag::warn_mt_message, range) << message; in reportWarning()
698 SourceRange range) { in reportNote() argument
699 report(loc, diag::note_mt_message, range) << message; in reportNote()