Add 'remark' diagnostic type in clang
Tobias Grosser
tobias at grosser.es
Wed Feb 26 02:22:38 PST 2014
On 02/25/2014 11:20 AM, Tobias Grosser wrote:
> Hi,
>
> I would like to add the following patch. (I submitted a corresponding
> patch to LLVM).
Hi,
thanks to everybody for the comments. Here the conclusions I have taken.
1) We need a new severity level
The 'note' level is inherently attached to other diagnostics. We need a
new severity level for informative remarks that are not attached to
any other diagnostic.
We have broad agreement here.
2) Adding the new severity level / the name of the diagnostic
Only small issues have been found in the patch. All of them have been
addressed. The last open issues was the name of the diagnostic. Richard
proposed 'info' or 'remark'. Chris and Eric prefer to call the severity
'info', in case there is no prior art. However, Alexander and Arthur
mentioned prior art for 'remark' in both icc and edg. Also the comment
from Arthur sounds right:
I don't know of any compiler that uses the term "informative".
Besides, that's redundant; *all* compiler diagnostics are purely
"informative" by definition. The variable here is //severity//:
fatal-error, recoverable-error, warning, remark, silent.
I personally preferred 'info' first, but now came to the conclusion
that 'remark' is the better option, except someone sees strong reasons
to ignore the prior art.
I plan to resubmit this patch for review by itself to keep the in-flight
patches small. It is mostly independent from the next step,
as 'remarks' are off by default.
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.
All the best,
Tobias
More information about the cfe-commits
mailing list