Add 'remark' diagnostic type in clang

Alp Toker alp at nuanti.com
Wed Feb 26 14:03:40 PST 2014


On 26/02/2014 21:52, Arthur O'Dwyer wrote:
> On Wed, Feb 26, 2014 at 1:31 PM, Alp Toker <alp at nuanti.com> wrote:
>> Keep in mind that it may be preferable not to
>> permit upgrading remarks to errors (another potential use case of this being
>> informational diagnostics about system headers that aren't user-actionable).
> I would rephrase that like this:
> Users will DEFINITELY want to upgrade a specific remark to an error,
> since that's basically your intended use case: "please stop my build
> if vectorizer remark <foo> is issued."  However, since Clang currently
> has zero infrastructure in this area, you shouldn't try to roll that
> infrastructure work into this particular patch.

Agree on going incrementally, Tobias's patch is looking nice and short. 
Having limited functionality here is best until things settle.

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

I'm glad this might be usable for the system headers use case which was 
shouting out for something like this :-)

Alp.



>
> –Arthur

-- 
http://www.nuanti.com
the browser experts




More information about the cfe-commits mailing list