[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.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 03:28:51 PST 2020


alexfh 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;
----------------
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).


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

https://reviews.llvm.org/D69782





More information about the cfe-commits mailing list