diff --git a/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp b/clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp index 8be88724908e..2a8a97806ef7 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 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 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.