<div dir="ltr">As David says, LibTooling was made for this task - I myself don't have a deep understanding of how easy those things would be to do with libclang - you might need to expose some interfaces that are not exposed yet (that might be a great contribution to the clang community if you happen to try that route ;)<div>
<br></div><div>Cheers,</div><div>/Manuel</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 29, 2013 at 5:52 PM, <a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a> <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Tooling, specifically the clang-fixit till is one place sheet efforts are being made to apply these kinds of refractoriness (specifically clang-fixit would apply predefined naming  convention rules, rather than user specified renaming).<br>

<br>One of the things that tooling might help you with would be the necessary reformatting (clang-format) and build/source discovery.<div class="HOEnZb"><div class="h5"><br><p dir="ltr"></p>
<p dir="ltr">On Sunday, December 29, 2013 3:49:06 AM, Schlottke, Michael <<a href="mailto:m.schlottke@fz-juelich.de" target="_blank">m.schlottke@fz-juelich.de</a>> wrote:</p>
<blockquote><p dir="ltr">Hi everyone,</p>
<p dir="ltr">For our research group, I need to get started with some relatively simple refactoring tasks in a modestly complex C++ project. The goal is to have a tool that (in the beginning) is good for at least two things:<br>


- renaming member variables/methods<br>
- replacing member variable access by getters/setters</p>
<p dir="ltr">After the extremely positive experiences I've had with clang (and since the IDE tools I tried failed for our project), I'd like to utilize the clang infrastructure for this task. However, in the very beginning I already face the problem of where I should start:</p>


<p dir="ltr">On the one hand, LibTooling seems to be the interface of choice when it comes to refactoring code (it's one of the canonical examples on <a href="http://clang.llvm.org/docs/Tooling.html" target="_blank">http://</a><a href="http://clang.llvm.org/docs/Tooling.html" target="_blank">clang.llvm.org</a><a href="http://clang.llvm.org/docs/Tooling.html" target="_blank">/docs/</a><a href="http://clang.llvm.org/docs/Tooling.html" target="_blank">Tooling.html</a>). On the other hand libclang seems to be easier to use, has Python bindings, and from the outset looks like it could be already sufficient for the task at hand.</p>


<p dir="ltr">Do you have any experience/recommendations for which library is the one to use in this case?</p>
<p dir="ltr">Regards,</p>
<p dir="ltr">Michael</p>
<p dir="ltr">--<br>
Michael Schlottke</p>
<p dir="ltr">SimLab Highly Scalable Fluids & Solids Engineering<br>
Jülich Supercomputing Centre (JSC)<br>
Forschungszentrum Jülich GmbH<br>
52425 Jülich<br>
Germany</p>
<p dir="ltr">Phone: <a href="tel:%2B49%20%282461%29%2061%202326" value="+492461612326" target="_blank">+49 (2461) 61 2326</a><br>
Mail: <a href="mailto:m.schlottke@fz-juelich.de" target="_blank">m.schlottke</a><a href="mailto:m.schlottke@fz-juelich.de" target="_blank">@</a><a href="mailto:m.schlottke@fz-juelich.de" target="_blank">fz</a><a href="mailto:m.schlottke@fz-juelich.de" target="_blank">-</a><a href="mailto:m.schlottke@fz-juelich.de" target="_blank">juelich.de</a><br>


Web: <a href="http://www.fz-juelich.de/jsc" target="_blank">http://</a><a href="http://www.fz-juelich.de/jsc" target="_blank">www.fz</a><a href="http://www.fz-juelich.de/jsc" target="_blank">-</a><a href="http://www.fz-juelich.de/jsc" target="_blank">juelich.de</a><a href="http://www.fz-juelich.de/jsc" target="_blank">/</a><a href="http://www.fz-juelich.de/jsc" target="_blank">jsc</a><br>

<br><br></p>
<p dir="ltr"><font color="#000000">------------------------------------------------------------------------------------------------</font><br>
<font color="#000000">------------------------------------------------------------------------------------------------</font><br>
<font color="#000000">Forschungszentrum</font><font color="#000000"> </font><font color="#000000">Juelich</font><font color="#000000"> GmbH</font><br>
<font color="#000000">52425 </font><font color="#000000">Juelich</font><br>
<font color="#000000">Sitz </font><font color="#000000">der</font><font color="#000000"> </font><font color="#000000">Gesellschaft</font><font color="#000000">: </font><font color="#000000">Juelich</font><br>
<font color="#000000">Eingetragen</font><font color="#000000"> </font><font color="#000000">im</font><font color="#000000"> </font><font color="#000000">Handelsregister</font><font color="#000000"> </font><font color="#000000">des</font><font color="#000000"> </font><font color="#000000">Amtsgerichts</font><font color="#000000"> </font><font color="#000000">Dueren</font><font color="#000000"> </font><font color="#000000">Nr</font><font color="#000000">. HR B 3498</font><br>


<font color="#000000">Vorsitzender</font><font color="#000000"> </font><font color="#000000">des</font><font color="#000000"> </font><font color="#000000">Aufsichtsrats</font><font color="#000000">: </font><font color="#000000">MinDir</font><font color="#000000"> Dr. Karl </font><font color="#000000">Eugen</font><font color="#000000"> </font><font color="#000000">Huthmacher</font><br>


<font color="#000000">Geschaeftsfuehrung</font><font color="#000000">: Prof. Dr. </font><font color="#000000">Achim</font><font color="#000000"> </font><font color="#000000">Bachem</font><font color="#000000"> (</font><font color="#000000">Vorsitzender</font><font color="#000000">),</font><br>


<font color="#000000">Karsten</font><font color="#000000"> </font><font color="#000000">Beneke</font><font color="#000000"> (</font><font color="#000000">stellv</font><font color="#000000">. </font><font color="#000000">Vorsitzender</font><font color="#000000">), Prof. Dr.-</font><font color="#000000">Ing</font><font color="#000000">. Harald Bolt,</font><br>


<font color="#000000">Prof. Dr. Sebastian M. Schmidt</font><br>
<font color="#000000">------------------------------------------------------------------------------------------------</font><br>
<font color="#000000">------------------------------------------------------------------------------------------------</font><br>
</p>
</blockquote>
<p dir="ltr"><br>
</p>
</div></div></blockquote></div><br></div>