Hi Chris,<br><br>I would be interested to get my feet wet and actually I was thinking of this no later than yesterday (following Sean's mail).<br><br>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.<br>
<br>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.<br>
<br>I had thought about 3 sections for each error/warning actually:<br>- brief<br>- description, including code excerpts to illustrate the issue.<br>- references to the standard (for those who wish to dig deeper)<br><br>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.<br>
<br>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.<br><br>Matthieu<br><br>
Note: regarding the activation of "everything", what of a "-Wextra" that activates everything "-Wall" did not, like gcc ?<br><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Date: Sat, 5 Mar 2011 08:08:12 -0800<br>
From: Chris Lattner <<a href="mailto:clattner@apple.com">clattner@apple.com</a>><br>
Subject: Re: [cfe-dev] User documentation for supported warnings and<br>
        --analyze mode<br>
To: Sean McBride <<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>><br>
Cc: <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
Message-ID: <<a href="mailto:786C7699-769F-4E44-86E9-C6D60D169751@apple.com">786C7699-769F-4E44-86E9-C6D60D169751@apple.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
On Mar 3, 2011, at 10:59 AM, Sean McBride wrote:<br>
<br>
>> Sounds completely reasonable.  Unfortunately, documentation on either is<br>
>> completely lacking at this point.<br>
><br>
> That's a real shame because one of clang's greatest advantages over gcc<br>
> is it's warnings.  I've often wondered if there's some great warning<br>
> flags that could help me that I haven't turned on because I just don't<br>
> know about them. :(<br>
><br>
> Is there a -Wall-and-I-mean-really-all ?  If so, combined with -<br>
> fdiagnostics-show-option, one could start with everything and weed out<br>
> ones considered too noisy.<br>
<br>
Hi Sean,<br>
<br>
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.<br>

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

<br>
If anyone is interested in this, it would make a very straight-forward "getting started with clang" project.<br>
<br>
-Chris<br></blockquote></div>