[cfe-dev] [PATCH] Docs on how to write RAV based ASTFrontendActions

Dean Sutherland dsutherland at cert.org
Fri Apr 20 07:33:07 PDT 2012

It's GREAT to see this documentation.  That said, I'll pick a few nits in this one.

First, you need to go on a "which" hunt.  A very simple rule of thumb is that almost all uses of "which" should really be "that" instead. This applies to all instances in the RAVFrontendAction text -- I think.

"... to implement a RecursiveASTVisitor to extract the information we are interested in from…" should read
"... to implement a RecursiveASTVisitor to extract the relevant information from…"
More generally, there are a LOT of "the X we are interested in" in this document.  Most of these would read better as "the relevant X".

"...; the exception are TypeLoc nodes which are passed by-value."
This specific "which" should remain!

"We can implement just the methods for the nodes we're interested in." might be better written as
"We only need to implement the methods for the relevant nodes." (or perhaps "… node types.").

"For example, when we want to find all…" might be better as
"For example, to find all…"

"availale" should be "available"

One final style issue.  I find it useful to format names of code entities that appear in running text in the code font to emphasize their "program-ness"; similarly, code snippets in running text work better in the code font. By comparison, concepts like "an AST" should be text font -- even thought the type AST would show up in code font.  It's a bit of a pain to format documents this way, but it does improve clarity.

Please feel free to ignore any or all of the above if it violates any project style guidelines, or even if it simply seems like a bad idea to you.

Dean F. Sutherland
dsutherland at cert.org

On Apr 20, 2012, at 8:14 AM, Manuel Klimek wrote:

> As promised, the next step in the tutorial section...
> Cheers,
> /Manuel
> <RAVFrontendAction.html><ATT00001.c>

More information about the cfe-dev mailing list