diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-05-18 09:48:46 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-05-18 09:48:46 +0000 |
| commit | 8b55a2b76ce0e7ab06bb30a1921ebbbc3e221bea (patch) | |
| tree | afd43919dab6631e78eb5ad7ea157db5a63317c8 /clang-tools-extra | |
| parent | d56676ed654d743a87e3b25cbb65e21d2c4dd565 (diff) | |
| download | bcm5719-llvm-8b55a2b76ce0e7ab06bb30a1921ebbbc3e221bea.tar.gz bcm5719-llvm-8b55a2b76ce0e7ab06bb30a1921ebbbc3e221bea.zip | |
[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
Diffstat (limited to 'clang-tools-extra')
| -rw-r--r-- | clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp | 7 |
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. |

