forked from OSchip/llvm-project
[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:
parent
d56676ed65
commit
8b55a2b76c
|
@ -254,8 +254,8 @@ std::vector<FixItHint> IncludeSorter::GetEdits() {
|
||||||
// Otherwise report the current block edit and start a new block.
|
// Otherwise report the current block edit and start a new block.
|
||||||
} else {
|
} else {
|
||||||
if (CurrentEndLine) {
|
if (CurrentEndLine) {
|
||||||
Fixes.push_back(
|
Fixes.push_back(FixItHint::CreateReplacement(
|
||||||
FixItHint::CreateReplacement(CurrentRange, CurrentText));
|
CharSourceRange::getCharRange(CurrentRange), CurrentText));
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentEndLine = LineEdit.first;
|
CurrentEndLine = LineEdit.first;
|
||||||
|
@ -265,7 +265,8 @@ std::vector<FixItHint> IncludeSorter::GetEdits() {
|
||||||
}
|
}
|
||||||
// Finally, report the current block edit if there is one.
|
// Finally, report the current block edit if there is one.
|
||||||
if (CurrentEndLine) {
|
if (CurrentEndLine) {
|
||||||
Fixes.push_back(FixItHint::CreateReplacement(CurrentRange, CurrentText));
|
Fixes.push_back(FixItHint::CreateReplacement(
|
||||||
|
CharSourceRange::getCharRange(CurrentRange), CurrentText));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset the remaining internal state.
|
// Reset the remaining internal state.
|
||||||
|
|
Loading…
Reference in New Issue