[cfe-commits] [PATCH] More Docs: Mastering the Clang AST

Manuel Klimek klimek at google.com
Mon Jul 23 02:24:09 PDT 2012


On Thu, Jul 19, 2012 at 10:46 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> On Thu, Jul 19, 2012 at 1:26 AM, Manuel Klimek <klimek at google.com> wrote:
>>
>> Any comments on the content of the doc, or do you guys think it's fine
>> to go in? :)
>
>
> 'targetted': the more common spelling is with only 2 't's.

Done

>
>> $ clang -cc1 -ast-dump-xml test.cc
>> ... cutting out internal declarations of clang ...
>
> I'd suggest also adding -undef to this command, to reduce the bulk of the
> internal declarations. In an ideal world, that'd remove all of them, but we
> still include __int64_t and friends in that mode :(

Done

>
>> In general, -ast-dump-xml dumps declarations as XML and statements as
>> S-expressions.
>
> This promises more than we deliver. ... "dumps declarations in an XML-style
> format and statements in an S-expression-style format" is closer to the
> truth :)

Done

>
>>  declaration statement that delcares our result variable
>
> Typo: 'delcares'

Done

>
>> Clang's AST nodes are modeled on a type hierarchy that does not have a
>> common ancestor.
>
> s/type/class/, to avoid confusion with clang::Type.

Done

>
>> Instead, there are multiple larger hierarchies for basic node types like
>> Decl and Stmt.
>
> It might be useful to say that many of the important AST nodes derive from
> Type, Decl, DeclContext or Stmt, with some classes deriving from both Decl
> and DeclContext.

Done

>
> I think the document could do with some discussion of the Type hierarchy,
> QualType, canonical types and type sugar.

Next iteration? :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120723/55d46f02/attachment.html>


More information about the cfe-commits mailing list