[PATCH] D69782: Summary: Instead of dropping all the ranges associated with a Diagnostic when converting them to a ClangTidy error, instead attach them to the ClangTidyError, so they can be consumed by other APIs.

Joe Turner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 20 12:19:53 PST 2020


compositeprimes added inline comments.


================
Comment at: include/clang/Tooling/Core/Diagnostic.h:51
+/// Represents a single source ranges to be associated with a diagnostic.
+struct DiagnosticAssociatedRange {
+  DiagnosticAssociatedRange() = default;
----------------
alexfh wrote:
> This comment was lost by Phabricator (or I just wanted to leave it without actually doing it?).
> 
> The name assumes a specific usage. I'd try to make it more generic in case there's another use case for the struct, for example: `ByteRange` (as opposed to `TextRange`, which would be {start line, start column, end line, end column}) or `FileByteRange` (if we want to stress that it contains a file name).
Ah good idea, I like that name, Done


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69782/new/

https://reviews.llvm.org/D69782





More information about the cfe-commits mailing list