[cfe-dev] Tree transformation in clang

Chandler Carruth chandlerc at google.com
Wed Nov 30 20:25:08 PST 2011


On Tue, Nov 29, 2011 at 7:20 PM, eyasu getahun <eya.get at gmail.com> wrote:

> I have seen tree transformation in clang(TreeTransform.h). This is to
> transform one AST to another AST.


Not quite. It provides a basis for building such a transformation, not an
actual transformation.


> 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.


I'm not sure who "they" is, but the only real user I know of for this
header is the template instantiation logic. It does instantiation through a
very specific tree transformation implemented using the facilities of
TreeTransform.h.


> Even there is no explicit command line option for the transformation. Do
> you guys think that the transformation is well implemented and documented?


No, as I said, there is no single transformation. You are looking at a
small, internal library used deep in Clang's implementation. What problem
are you actually trying to solve? I suspect the solution will not involve
this header file, but I can know (and it is unlikely anyone on this list
can help you) if you don't say what it is you're trying to do...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111130/1d2d74e8/attachment.html>


More information about the cfe-dev mailing list