[cfe-dev] Adding support for Cloning in the AST
Douglas Gregor
dgregor at apple.com
Mon May 18 11:14:28 PDT 2009
On May 17, 2009, at 2:22 AM, Sebastian Redl wrote:
> 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.
Why would we clone declarations?
- Doug
More information about the cfe-dev
mailing list