<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi,<br>
      TreeTransform is the facility used to rebuild the templated nodes
    of the AST once<br>
    clang has the full type/value information (for example at
    instantiation time). It replaces<br>
    the nodes that are marked as of dependent type with their actual
    instantiation type and<br>
    performs the semantic checks with the new types.<br>
    <br>
      Maybe if you clarify a little bit more (and perhaps give examples)
    I can be more helpful.<br>
    In general TreeTransform is not meant to implement every possible
    tree-to-tree transformation.<br>
    <br>
    Nevertheless, it can be used as model how to build your own one.
    Right now I am not aware of<br>
    an interface that implements arbitrary tree-to-tree transformation.
    <br>
    However, there are couple of interfaces that you might find useful
    for that. You might want to<br>
    have a look at clang::ASTConsumer, clang::SemaConsumer and
    clang::RecursiveASTVisitor<br>
    <br>
    Depending on what is the exact idea of the transformation you could
    also use clang's <br>
    rewrite subsystem, which is pretty powerful, but it AFAIK it doesn't
    work on AST level. It is more<br>
    source-to-source transformation.<br>
    <br>
    Vassil<br>
    <br>
    On 11/30/2011 04:20 AM, eyasu getahun wrote:
    <blockquote
cite="mid:CAG_wWdrQHybiZe+q5MwSSz8XiuZ4EzDHGhzER8k=Ry6AimpxAA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <font color="#330099"><font size="2"><font face="georgia,serif">Hello
            all,<br>
            <br>
             I have seen tree transformation in clang(TreeTransform.h).
            This is to transform one AST to another AST. But it is not
            clear for me how they used this header file for the
            transformation. I didn't see the function for the
            transformation. Just they used this header file for semantic
            template instantiation and template deduction. Even there is
            no explicit command line option for the transformation. Do
            you guys think that the transformation is well implemented
            and documented? please let me know if you have any idea
            about the transformation that they used in clang. Thanks in
            advance!<span class="HOEnZb"><font color="#888888"><br
                  clear="all">
              </font></span></font></font></font>
      <div class="yj6qo ajU">
        <div id=":1nj" class="ajR" tabindex="0"><img
            moz-do-not-send="true" class="ajT" src="images/cleardot.gif"></div>
      </div>
      <br clear="all">
      <br>
      -- <br>
      <b>With Best Regards,<br>
        <br>
        ===========================================<br>
        Eyasu Getahun</b><br>
      <br>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>