[PATCH] D68885: Add a Ranges field to Diagnostic struct
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 06:37:27 PDT 2019
gribozavr added a comment.
Please upload patches with context in future (`arc diff` will do that for you).
Please also merge this patch with the user, https://reviews.llvm.org/D68887. No need to add untested code.
================
Comment at: include/clang/Tooling/Core/Diagnostic.h:88
+
+
+ /// Extra source ranges associated with the diagnostic. By default, the
----------------
Extra empty line.
================
Comment at: include/clang/Tooling/Core/Diagnostic.h:92
+ /// `Message` field, but if `Ranges` is nonempty, they will be preferred
+ /// representation of the source code associated with the diagnostic.
+ ArrayRef<CharSourceRange> Ranges;
----------------
I don't understand the "preferred" wording here. What do you mean?
Also, this is a departure from how compiler warnings and ClangTidy messages work. Additional ranges are used to highlight parts of the code relevant to the problem, not to reposition the diagnostic.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68885/new/
https://reviews.llvm.org/D68885
More information about the cfe-commits
mailing list