[cfe-dev] RefactoringTool - set output file path?

Manuel Klimek klimek at google.com
Mon Mar 16 01:45:11 PDT 2015


On Sat, Mar 14, 2015 at 12:57 PM Gabor Kozar <kozargabor at gmail.com> wrote:

>  I'm working on a clang tool that instruments source code. However, I
> can't seem to find any option to set the output file path, i.e. my tool
> will always modify the original file, which is not what I want.
>
> Was this a deliberate decision, or am I just missing something?
>

If you're using a refactoring tool, and you chose to call the function to
rewrite the original files, that's a deliberate decision. Otherwise, you
can write out the modified files in whatever way you want.
If you're asking whether there's library support for writing files to a
different directory: no there isn't. Usually what people want to do is to
write the diffs / changes out, instead of the modified files, in that
case...

Cheers,
/Manuel


>
> ---
> Best regards,
>
> Gábor 'ShdNx' Kozár
> http://gaborkozar.me
>
>
>  _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150316/95707d28/attachment.html>


More information about the cfe-dev mailing list