This revision was automatically updated to reflect the committed changes. Closed by commit rG071002ffdb3f: [clang-tidy] Copy the Ranges field from the Diagnostic when creating theā¦ (authored by compositeprimes, committed by alexfh).
Changed prior to commit: https://reviews.llvm.org/D68887?vs=245915&id=247593#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68887/new/ https://reviews.llvm.org/D68887 Files: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp Index: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp =================================================================== --- clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp +++ clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp @@ -62,6 +62,9 @@ } assert(Error.Message.Message.empty() && "Overwriting a diagnostic message"); Error.Message = TidyMessage; + for (const CharSourceRange &SourceRange : Ranges) { + Error.Ranges.emplace_back(Loc.getManager(), SourceRange); + } } void emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc,
Index: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp =================================================================== --- clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp +++ clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp @@ -62,6 +62,9 @@ } assert(Error.Message.Message.empty() && "Overwriting a diagnostic message"); Error.Message = TidyMessage; + for (const CharSourceRange &SourceRange : Ranges) { + Error.Ranges.emplace_back(Loc.getManager(), SourceRange); + } } void emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc,
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits