[cfe-dev] RefactoringTool corrupts source file
Daniel Dilts via cfe-dev
cfe-dev at lists.llvm.org
Mon Aug 31 13:07:16 PDT 2015
I have a pair of FrontEndActions that I am running against a source file.
The first one modifies the token stream. The second one modifies the AST.
I am running them both using the same RefactoringTool instance. When both
actions modify the source it corrupts the file. Looking at it more closely
it appears to be caused by runAndSave() not clearing out
RefactoringTool::Replace after applying the replacements.
Should runAndSave() clear the replacements collection after applying them
or is the current behavior correct?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150831/5df4acbd/attachment.html>
More information about the cfe-dev
mailing list