[cfe-dev] cfe-dev Digest, Vol 45, Issue 19

Douglas Gregor dgregor at apple.com
Sun Mar 6 10:52:30 PST 2011


On Mar 6, 2011, at 5:05 AM, Matthieu Monrocq wrote:

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

That would be great!

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

Yeah. In addition to allowing us to support a --help <warning> flag, this would mean that we could actually vend documentation for the various warnings through the libclang interface.

> I had thought about 3 sections for each error/warning actually:
> - brief

We definitely want this for all errors/warnings.

> - description, including code excerpts to illustrate the issue.

I expect we won't need this everywhere. Rather, we should focus on giving good descriptions for the diagnostics that tend to confuse people.

> - references to the standard (for those who wish to dig deeper)

The language lawyer in me loves this idea, but I think it's more work than it's worth. Only a tiny fraction of users will ever use this feature.

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


I think this would be great, and I think you'll get help with the content once there's a framework in place.

  - Doug



More information about the cfe-dev mailing list