Add 'remark' diagnostic type in clang

Hal Finkel hfinkel at anl.gov
Wed Feb 26 14:26:05 PST 2014


----- Original Message -----
> From: "Alp Toker" <alp at nuanti.com>
> To: "Arthur O'Dwyer" <arthur.j.odwyer at gmail.com>
> Cc: "Richard Smith" <richard at metafoo.co.uk>, "cfe-commits" <cfe-commits at cs.uiuc.edu>
> Sent: Wednesday, February 26, 2014 4:03:40 PM
> Subject: Re: Add 'remark' diagnostic type in clang
> 
> 
> 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.

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.

 -Hal

> 
> 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
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the cfe-commits mailing list