[cfe-dev] overwrite rewritten text

Jonas Toth via cfe-dev cfe-dev at lists.llvm.org
Mon Dec 10 08:38:07 PST 2018


Hi,

did you consider creating a Replacement instead of a Insert-Remove
combination?

Best, Jonas

Am 10.12.18 um 06:04 schrieb Kihong Heo via cfe-dev:
> Hi All,
>
> How can I overwrite or remove some code parts which were already rewritten?
>
> Here is my code:
>
> string S = …
> Rewriter.InsertText(Loc, S);
> Rewriter.RemoveText(Loc, S.length());    <=== Here, Segmentation fault.
>
>
> Thanks for your help!
>
> Best,
> Kihong
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list