[cfe-dev] cfe-dev Digest, Vol 45, Issue 19
Matthieu Monrocq
matthieu.monrocq at gmail.com
Sun Mar 6 05:05:14 PST 2011
Hi Chris,
I would be interested to get my feet wet and actually I was thinking of this
no later than yesterday (following Sean's mail).
If there's one thing that I appreciate in Visual Studio's compiler it's
their extensive documentation on errors and warnings, when fix-it are not
available it's not always obvious to the beginner what need to be done and
I'd be glad to help CLang improve in this department.
I was thinking of adding a target to generate the .html webpages from the
Diagnostic*.td files, though I haven't yet thought extensively of how to
organize the said pages (probably by groups ?). I had not thought about
making this available directly from the command line, but it does sound
great to have it available at the tips of my fingers.
I had thought about 3 sections for each error/warning actually:
- brief
- description, including code excerpts to illustrate the issue.
- references to the standard (for those who wish to dig deeper)
I would be glad to actually contribute to these sections, though given the
sheer number of errors and warnings and my total lack of knowledge about
Objective-C, I suppose I would need help in this department.
I'd be glad to hear about everyone's thoughts on the subject, since I guess
that a number of people have already thought about it without having the
time to actually launch themselves in.
Matthieu
Note: regarding the activation of "everything", what of a "-Wextra" that
activates everything "-Wall" did not, like gcc ?
Date: Sat, 5 Mar 2011 08:08:12 -0800
> From: Chris Lattner <clattner at apple.com>
> Subject: Re: [cfe-dev] User documentation for supported warnings and
> --analyze mode
> To: Sean McBride <sean at rogue-research.com>
> Cc: cfe-dev at cs.uiuc.edu
> Message-ID: <786C7699-769F-4E44-86E9-C6D60D169751 at apple.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> On Mar 3, 2011, at 10:59 AM, Sean McBride wrote:
>
> >> Sounds completely reasonable. Unfortunately, documentation on either is
> >> completely lacking at this point.
> >
> > That's a real shame because one of clang's greatest advantages over gcc
> > is it's warnings. I've often wondered if there's some great warning
> > flags that could help me that I haven't turned on because I just don't
> > know about them. :(
> >
> > Is there a -Wall-and-I-mean-really-all ? If so, combined with -
> > fdiagnostics-show-option, one could start with everything and weed out
> > ones considered too noisy.
>
> Hi Sean,
>
> All of the clang warning flags are maintained in ".td" files in
> clang/include/clang/Basic. Something that has been on my todo list for a
> very long time (but isn't likely to get tackled anytime soon) is to put
> descriptive text into the .td files for each flag... both a single line
> description suitable for -help output, and a full-on paragraph describing
> its use for the HTML manual and a man page.
>
> The idea is that the clang binary (when passed --help, and some new flag)
> could then self describe the warning flags that it takes. I would actually
> really like to make the "clang --help" be a multilevel tool like the lldb
> console help system, so that you could have "clang --help warnings" for
> example to dive into various subsections of the help output, or "clang
> --help all" if you just want to grep through a giant dump of output.
>
> If anyone is interested in this, it would make a very straight-forward
> "getting started with clang" project.
>
> -Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110306/db624d3e/attachment.html>
More information about the cfe-dev
mailing list