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

Matthieu Monrocq matthieu.monrocq at gmail.com
Fri Mar 11 12:12:41 PST 2011


Hello,

This is the first patch-set to better document clang diagnostics.

> I have added two fields into the Diagnostic (.td) class: Brief and
Explanation; and modified the subsequent generation (and exploitation) of
the table
> I have added two getters to DiagnosticIDs to get the "BriefExplanation"
and "FullExplanation"

> There is also a few corrections of comments that were (it seems) out of
sync

Note: there is one (little) patch for LLVM, because the TableGen backend is
in llvm repository... and the two patches are intrisically tied (obviously)

Note 2: is this normally tested or do we assume that is compilation a test
in itself ?

Unless we want the same Brief / Explanation for Groups too, this normally
implement the "libclang" part, so next are the HTML pages generation and the
Help menu modification.


For those tasks, the distinction of where the diagnostic comes from probably
does not makes sense for the user, so I would expect to have to group the
warnings using the categories and subgroups rather than AST/Sema/Parse. I
suppose that we'll want to expose both warnings and extension warnings here.

There is one catch though: the individual warnings are not named. I was
wondering if I should create a name (#ENUM in the macro ? The internal ID ?)
or if the Brief would be enough and I'd just list all the
briefs/explanations underneath the subgroup they belong to.


With regard to the HTML generation: I was thinking about using a Python
script and invoke it as part of the build step. This would require, I guess,
that I update the Python Bindings (if any ?) to extract the information from
libclang. I'd appreciate pointers to the documentation (if any).


Comments / Advices are welcome,
Matthieu.

2011/3/8 Sean McBride <sean at rogue-research.com>

> On Sun, 6 Mar 2011 14:05:14 +0100, Matthieu Monrocq said:
>
> >Note: regarding the activation of "everything", what of a "-Wextra" that
> >activates everything "-Wall" did not, like gcc ?
>
> For the record, gcc does not do that.  -Wextra is more warnings than -
> Wall, but it is not everything.
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110311/7657ce85/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang_diagnostic_explanation.diff
Type: application/octet-stream
Size: 9756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110311/7657ce85/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm_diagnostic_explanation.diff
Type: application/octet-stream
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110311/7657ce85/attachment-0001.obj>


More information about the cfe-dev mailing list