[clang-tidy] Fix a functional change from r269656.

Instead of forming char ranges that patch made us form token ranges,
which behave subtly different. Sadly I'm only seeing this as part of a
larger test case that I haven't fully reduced yet.

llvm-svn: 269896
This commit is contained in:
Benjamin Kramer 2016-05-18 09:48:46 +00:00
parent d56676ed65
commit 8b55a2b76c
1 changed files with 4 additions and 3 deletions

View File

@ -254,8 +254,8 @@ std::vector<FixItHint> IncludeSorter::GetEdits() {
// Otherwise report the current block edit and start a new block.
} else {
if (CurrentEndLine) {
Fixes.push_back(
FixItHint::CreateReplacement(CurrentRange, CurrentText));
Fixes.push_back(FixItHint::CreateReplacement(
CharSourceRange::getCharRange(CurrentRange), CurrentText));
}
CurrentEndLine = LineEdit.first;
@ -265,7 +265,8 @@ std::vector<FixItHint> IncludeSorter::GetEdits() {
}
// Finally, report the current block edit if there is one.
if (CurrentEndLine) {
Fixes.push_back(FixItHint::CreateReplacement(CurrentRange, CurrentText));
Fixes.push_back(FixItHint::CreateReplacement(
CharSourceRange::getCharRange(CurrentRange), CurrentText));
}
// Reset the remaining internal state.