Add 'remark' diagnostic type in clang

Chris Lattner clattner at apple.com
Wed Feb 26 14:27:39 PST 2014


On Feb 26, 2014, at 2:26 PM, Hal Finkel <hfinkel at anl.gov> wrote:

>>> 
>>> "Upgrade all remarks to errors" is a special case of "upgrade
>>> remarks
>>> <foo,bar,baz> to errors", and presumably would one day be available
>>> via something like `-Werror=remarks` or `-Werror=everything` (and
>>> the
>>> inverse via `-Wwarning=...` and `-Wremark=...`). Again, that's
>>> infrastructure that doesn't exist at the moment AFAIK.
>> 
>> That's reasonable. As long as plain -Werror _doesn't_ upgrade remarks
>> that's satisfactory for the other use case I mentioned.
>> 
>> So I'll qualify what I said: upgrading remarks to errors, if
>> supported,
>> should be an explicit feature that's distinct from the more common
>> plain
>> -Werror option that upgrades warnings to errors, which I believe is
>> what
>> you described.
> 
> Remarks should often indicate things that are good (like this loop was vectorized), and so upgrading remarks to errors will only make sense for 'negative' remarks.

Each remark should have its own identifier, so people can choose to upgrade them or not.  It’s not worth the complexity to try to add another level or behavior for “positive remarks”.

-Chris



More information about the cfe-commits mailing list