LGTM<br><br><div class="gmail_quote">On Tue, Jul 24, 2012 at 6:08 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Mon, Jul 23, 2012 at 9:44 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
> On Mon, Jul 23, 2012 at 2:24 AM, Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:<br>
>><br>
>> On Thu, Jul 19, 2012 at 10:46 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>><br>
>> wrote:<br>
>> > On Thu, Jul 19, 2012 at 1:26 AM, Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Any comments on the content of the doc, or do you guys think it's fine<br>
>> >> to go in? :)<br>
>> ><br>
>> ><br>
>> > 'targetted': the more common spelling is with only 2 't's.<br>
>><br>
>> Done<br>
>><br>
>> ><br>
>> >> $ clang -cc1 -ast-dump-xml test.cc<br>
>> >> ... cutting out internal declarations of clang ...<br>
>> ><br>
>> > I'd suggest also adding -undef to this command, to reduce the bulk of<br>
>> > the<br>
>> > internal declarations. In an ideal world, that'd remove all of them, but<br>
>> > we<br>
>> > still include __int64_t and friends in that mode :(<br>
>><br>
>> Done<br>
>><br>
>> ><br>
>> >> In general, -ast-dump-xml dumps declarations as XML and statements as<br>
>> >> S-expressions.<br>
>> ><br>
>> > This promises more than we deliver. ... "dumps declarations in an<br>
>> > XML-style<br>
>> > format and statements in an S-expression-style format" is closer to the<br>
>> > truth :)<br>
>><br>
>> Done<br>
>><br>
>> ><br>
>> >> declaration statement that delcares our result variable<br>
>> ><br>
>> > Typo: 'delcares'<br>
>><br>
>> Done<br>
>><br>
>> ><br>
>> >> Clang's AST nodes are modeled on a type hierarchy that does not have a<br>
>> >> common ancestor.<br>
>> ><br>
>> > s/type/class/, to avoid confusion with clang::Type.<br>
>><br>
>> Done<br>
>><br>
>> ><br>
>> >> Instead, there are multiple larger hierarchies for basic node types<br>
>> >> like<br>
>> >> Decl and Stmt.<br>
>> ><br>
>> > It might be useful to say that many of the important AST nodes derive<br>
>> > from<br>
>> > Type, Decl, DeclContext or Stmt, with some classes deriving from both<br>
>> > Decl<br>
>> > and DeclContext.<br>
>><br>
>> Done<br>
>><br>
>> ><br>
>> > I think the document could do with some discussion of the Type<br>
>> > hierarchy,<br>
>> > QualType, canonical types and type sugar.<br>
>><br>
>> Next iteration? :)<br>
><br>
><br>
> OK :)<br>
><br>
>> It is targeted at Developers<br>
><br>
> Lowercase 'd'.<br>
<br>
</div></div>Done.<br>
<div class="im"><br>
><br>
>> Clang's AST is different from ASTs of other languages in that it closely<br>
>> resembles both the written C++ code and the C++ standard.<br>
><br>
> Perhaps this should say 'Clang's AST is different from ASTs produced by some<br>
> other compilers'? I can't imagine any other language would have a compiler<br>
> whose AST closely resembles C++ code and the C++ standard ;)<br>
<br>
</div>Done.<br>
<div class="im"><br>
><br>
>> Clang has a builtin AST-dump mode, which can be enabled with the flags<br>
>> -ast-dump and -ast-dump-xml.<br>
><br>
> [...] has built-in AST-dump mode*s* ?<br>
<br>
</div>Done.<br>
<div class="im"><br>
><br>
> You should mention that a debug build is necessary for -ast-dump-xml to<br>
> produce output.<br>
<br>
</div>Done.<br>
</blockquote></div><br>