<div class="gmail_quote">On Mon, Jul 23, 2012 at 2:24 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="im">On Thu, Jul 19, 2012 at 10:46 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
> On Thu, Jul 19, 2012 at 1:26 AM, Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> 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>
</div>Done<br>
<div class="im"><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 the<br>
> internal declarations. In an ideal world, that'd remove all of them, but we<br>
> still include __int64_t and friends in that mode :(<br>
<br>
</div>Done<br>
<div class="im"><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 XML-style<br>
> format and statements in an S-expression-style format" is closer to the<br>
> truth :)<br>
<br>
</div>Done<br>
<div class="im"><br>
><br>
>>  declaration statement that delcares our result variable<br>
><br>
> Typo: 'delcares'<br>
<br>
</div>Done<br>
<div class="im"><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>
</div>Done<br>
<div class="im"><br>
><br>
>> Instead, there are multiple larger hierarchies for basic node types like<br>
>> Decl and Stmt.<br>
><br>
> It might be useful to say that many of the important AST nodes derive from<br>
> Type, Decl, DeclContext or Stmt, with some classes deriving from both Decl<br>
> and DeclContext.<br>
<br>
</div>Done<br>
<div class="im"><br>
><br>
> I think the document could do with some discussion of the Type hierarchy,<br>
> QualType, canonical types and type sugar.<br>
<br>
</div>Next iteration? :)<br>
</blockquote></div><br><div>OK :)</div><div><br></div><div>> It is targeted at Developers</div><div><br></div><div>Lowercase 'd'.</div><div><br></div><div>> Clang's AST is different from ASTs of other languages in that it closely resembles both the written C++ code and the C++ standard.</div>
<div><br></div><div>Perhaps this should say 'Clang's AST is different from ASTs produced by some other compilers'? I can't imagine any other language would have a compiler whose AST closely resembles C++ code and the C++ standard ;)</div>
<div><br></div><div>> Clang has a builtin AST-dump mode, which can be enabled with the flags -ast-dump and -ast-dump-xml.</div><div><br></div><div>[...] has built-in AST-dump mode*s* ?</div><div><br></div><div>You should mention that a debug build is necessary for -ast-dump-xml to produce output.</div>