[cfe-dev] Adding support for Cloning in the AST
Sebastian Redl
sebastian.redl at getdesigned.at
Sun May 17 02:22:57 PDT 2009
moataz ragab wrote:
> Hi Sebastian,
>
> Thanks.
>
> Attached 3 files: the patch "clone.diff". should be applied on the
> clang directory.
> RewriteLoopUnroll.cpp you have to put it in
> the clang-cc directory.
> test2.c: simple testcase for a forloop with
> array access in the body.
>
>
> you can invoke the loopunroller using:
>
> ../../../../Debug/bin/clang-cc -loop-unroll tests/test2.c
>
> Currently it crashes because ImplicitCastExpr object doesn't get
> cloned. The Stmt base class gets called instead of ImplicitCastExpr
It calls ImplicitCastExpr::Clone just fine. It crashes because it can't
clone the VarDecl.
Sebastian
More information about the cfe-dev
mailing list