[PATCH] D68887: [clang-tidy] Copy the Ranges field from the Diagnostic when creating the ClangTidyError
Joe Turner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 21 10:23:51 PST 2020
compositeprimes updated this revision to Diff 245915.
compositeprimes edited the summary of this revision.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68887/new/
https://reviews.llvm.org/D68887
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
Index: clang-tidy/ClangTidyDiagnosticConsumer.cpp
===================================================================
--- clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ 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.245915.patch
Type: text/x-patch
Size: 552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200221/2a00f4be/attachment.bin>
More information about the cfe-commits
mailing list