On 02/28/2014 03:40 AM, Arthur O'Dwyer wrote:
On Thu, Feb 27, 2014 at 6:23 PM, Tobias Grosser <[email protected]> wrote:
On 02/26/2014 10:27 PM, Tobias Grosser wrote:
On 02/26/2014 10:19 PM, Chris Lattner wrote:
On Feb 26, 2014, at 2:22 AM, Tobias Grosser <[email protected]> wrote:
3) How to enable 'remarks'
We need a way to enable 'remark' diagnostics. Quentin proposed to go
for an approach similar to the warning flags. Where we control remarks
with '-Rvector', '-Rloop-vector', ...
I will read a little bit through the existing option system to better
understand what it is doing, possibly adding documentation / cleanups
on my way. I will come back with a proposal here.
It’s a bit odd, but since these are diagnostics, why not use the
existing -W flags? You should be able to -Werror one of these,
control them with #pragma clang diagnostics, etc. It doesn’t seem
like we need more complexity in this space.
Good point. I will prepare the above patches such that they reuse the
existing infrastructure. If we really see a need for further
adjustments, we can do this incrementally.
I just updated the patch to reflect the conclusions of our discussion.
Please review for commit.
------------
[PATCH] Add 'remark' diagnostic type in 'clang'
A 'remark' is information that is not an error or a warning, but rather
some additional information provided to the user. In contrast to a 'note' a
'remark' is an independent diagnostic, whereas a 'note' always depends on
another diagnostic.
A typical use case for remark nodes is information provided to the user,
e.g. information provided by the vectorizer about loops that have been
vectorized.
This patch provides the initial implementation of 'remarks'. It includes
the actual definiton of the remark nodes, their printing as well as basic
parameter handling. We are reusing the existing diagnostic parameters which
means a remark
can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded
to an error using '-Werror=diagnostic-name'.
For the record, I strongly recommend that the syntax to enable a remark
should be "-Wremark=diagnostic-name", and that "-Wdiagnostic-name" should
(continue to) mean "upgrade this diagnostic to a warning".
However, I have no objection to the current semantics for an initial
checkin, as long as nobody uses it as an excuse to keep those semantics
forever.
Hi Arthur,
thanks for your comment. I personally am not sure if we want to ask each
user to type the long '-Wremark' every time. Also, the preference of
such a spelling was not discussed in the previous mails. I propose to
let this settle for a while to get some experience, or if you feel
strong about this, to start a specific discussion about this one change.
If we get agreement on this one, we can change the implementation
accordingly.
Cheers,
Tobias2
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits