[PATCH] D68887: [clang-tidy] Copy the Ranges field from the Diagnostic when creating the ClangTidyError
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 2 03:54:37 PST 2020
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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68887.247593.patch
Type: text/x-patch
Size: 606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200302/0ae98499/attachment.bin>
More information about the cfe-commits
mailing list