<div dir="ltr">Sounds good.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 30, 2013 at 8:35 PM, Vane, Edwin <span dir="ltr"><<a href="mailto:edwin.vane@intel.com" target="_blank">edwin.vane@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
The C++11 Migrator currently has the functionality to track changes made to files and then use libclangFormat to reformat the changed code. I want to get people's feedback on moving this functionality into clang-replace (or whatever is decided to name this tool). Let me provide some motivation.<br>

<br>
The next step for the migrator is process-based parallelism to speed up migration of code bases. The plan is a branch-and-gather approach: spawn multiple migrator processes to apply a single transform to multiple files. Each migrator process spits out serialized replacements. All serialized replacements are gathered in a single merge, deduplication, conflict detection, and application process: clang-replace. Then the next transform is applied in parallel. Due to the parallelism, the tracking of which parts of each file were changed is lost when clang-replace terminates. Clearly one option is to make the change tracking info persistent between executions of clang-replace. A simpler option, however, is to simply reformat changes every time clang-replace runs since knowledge of changed source ranges is known at this point.<br>

<br>
Reformatting wouldn't be necessary and could just be activated with a command-line switch if necessary.<br>
<br>
Beyond the migrator, affording the ability to reformat code after replacements are applied might be generally useful to other users of clang-replace. What say you all?<br>
<br>
--<br>
Edwin Vane<br>
  Software Developer<br>
  Intel of Canada, Inc.<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>