summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp b/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp
index 8be88724908..2a8a97806ef 100644
--- a/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp
+++ b/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp
@@ -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.
OpenPOWER on IntegriCloud