Lines Matching refs:range
68 CharRange(CharSourceRange range, SourceManager &srcMgr, Preprocessor &PP) { in CharRange()
69 SourceLocation beginLoc = range.getBegin(), endLoc = range.getEnd(); in CharRange()
71 if (range.isTokenRange()) { in CharRange()
136 void remove(SourceRange range);
138 void replace(SourceRange range, StringRef text);
139 void replace(SourceRange range, SourceRange replacementRange);
143 void increaseIndentation(SourceRange range,
146 bool clearDiagnostic(ArrayRef<unsigned> IDs, SourceRange range);
153 bool canRemoveRange(SourceRange range);
154 bool canReplaceRange(SourceRange range, SourceRange replacementRange);
159 void commitRemove(SourceRange range);
161 void commitReplace(SourceRange range, SourceRange replacementRange);
164 void commitIncreaseIndentation(SourceRange range,SourceLocation parentIndent);
165 void commitClearDiagnostic(ArrayRef<unsigned> IDs, SourceRange range);
167 void addRemoval(CharSourceRange range);
305 void TransformActionsImpl::remove(SourceRange range) { in remove() argument
309 data.R1 = range; in remove()
321 void TransformActionsImpl::replace(SourceRange range, StringRef text) { in replace() argument
324 remove(range); in replace()
325 insert(range.getBegin(), text); in replace()
328 void TransformActionsImpl::replace(SourceRange range, in replace() argument
333 data.R1 = range; in replace()
357 void TransformActionsImpl::increaseIndentation(SourceRange range, in increaseIndentation() argument
359 if (range.isInvalid()) return; in increaseIndentation()
363 data.R1 = range; in increaseIndentation()
369 SourceRange range) { in clearDiagnostic() argument
371 if (!CapturedDiags.hasDiagnostic(IDs, range)) in clearDiagnostic()
376 data.R1 = range; in clearDiagnostic()
408 bool TransformActionsImpl::canRemoveRange(SourceRange range) { in canRemoveRange() argument
409 return canInsert(range.getBegin()) && canInsertAfterToken(range.getEnd()); in canRemoveRange()
412 bool TransformActionsImpl::canReplaceRange(SourceRange range, in canReplaceRange() argument
414 return canRemoveRange(range) && canRemoveRange(replacementRange); in canReplaceRange()
445 void TransformActionsImpl::commitRemove(SourceRange range) { in commitRemove() argument
446 addRemoval(CharSourceRange::getTokenRange(range)); in commitRemove()
463 void TransformActionsImpl::commitReplace(SourceRange range, in commitReplace() argument
465 RangeComparison comp = CharRange::compare(replacementRange, range, in commitReplace()
470 if (range.getBegin() != replacementRange.getBegin()) in commitReplace()
471 addRemoval(CharSourceRange::getCharRange(range.getBegin(), in commitReplace()
473 if (replacementRange.getEnd() != range.getEnd()) in commitReplace()
477 range.getEnd())); in commitReplace()
491 void TransformActionsImpl::commitIncreaseIndentation(SourceRange range, in commitIncreaseIndentation() argument
495 std::make_pair(CharRange(CharSourceRange::getTokenRange(range), in commitIncreaseIndentation()
501 SourceRange range) { in commitClearDiagnostic() argument
502 CapturedDiags.clearDiagnostic(IDs, range); in commitClearDiagnostic()
519 void TransformActionsImpl::addRemoval(CharSourceRange range) { in addRemoval() argument
520 CharRange newRange(range, Ctx.getSourceManager(), PP); in addRemoval()
568 CharSourceRange range = CharSourceRange::getCharRange(I->first.Begin, in applyRewrites() local
570 receiver.increaseIndentation(range, I->second); in applyRewrites()
575 CharSourceRange range = CharSourceRange::getCharRange(I->Begin, I->End); in applyRewrites() local
576 receiver.remove(range); in applyRewrites()
634 void TransformActions::remove(SourceRange range) { in remove() argument
635 static_cast<TransformActionsImpl*>(Impl)->remove(range); in remove()
642 void TransformActions::replace(SourceRange range, StringRef text) { in replace() argument
643 static_cast<TransformActionsImpl*>(Impl)->replace(range, text); in replace()
646 void TransformActions::replace(SourceRange range, in replace() argument
648 static_cast<TransformActionsImpl*>(Impl)->replace(range, replacementRange); in replace()
661 void TransformActions::increaseIndentation(SourceRange range, in increaseIndentation() argument
663 static_cast<TransformActionsImpl*>(Impl)->increaseIndentation(range, in increaseIndentation()
668 SourceRange range) { in clearDiagnostic() argument
669 return static_cast<TransformActionsImpl*>(Impl)->clearDiagnostic(IDs, range); in clearDiagnostic()
677 SourceRange range) { in reportError() argument
692 Diags.Report(loc, diagID) << range; in reportError()
697 SourceRange range) { in reportWarning() argument
712 Diags.Report(loc, diagID) << range; in reportWarning()
716 SourceRange range) { in reportNote() argument
731 Diags.Report(loc, diagID) << range; in reportNote()