[cfe-dev] Clang rewriter: what can be effectively removed from the buffer?
Sebastian Redl
sebastian.redl at getdesigned.at
Tue Oct 30 08:41:27 PDT 2012
On 30.10.2012, at 15:00, GabrieleCocco wrote:
> Hi to everybody.
> I'm finding problems in removing some elements inside a translation unit
> using Rewriter.
> The interesting elements are:
>
> - Function declaration/definition:
> rewriter.RemoveText(function->getSourceRange()); doesn't remove anything
That looks like a bug. FunctionDecl::getSourceRange() should return the range for the entire function.
Sebastian
More information about the cfe-dev
mailing list