Index: clang-tidy/ClangTidy.cpp =================================================================== --- clang-tidy/ClangTidy.cpp +++ clang-tidy/ClangTidy.cpp @@ -125,7 +125,6 @@ // Retrieve the source range for applicable fixes. Macro definitions // on the command line have locations in a virtual buffer and don't // have valid file paths and are therefore not applicable. - SourceRange Range; SourceLocation FixLoc; ++TotalFixes; bool CanBeApplied = false; @@ -166,7 +165,7 @@ FixLoc = getLocation(FixAbsoluteFilePath, Repl.getOffset()); SourceLocation FixEndLoc = FixLoc.getLocWithOffset(Repl.getLength()); - Range = SourceRange(FixLoc, FixEndLoc); + CharSourceRange Range = CharSourceRange::getCharRange(SourceRange(FixLoc, FixEndLoc)); Diag << FixItHint::CreateReplacement(Range, Repl.getReplacementText()); }