<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 29, 2013 at 7:35 PM, Schlottke, Michael <span dir="ltr"><<a href="mailto:m.schlottke@fz-juelich.de" target="_blank">m.schlottke@fz-juelich.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
Hi Manuel, 
<div><br>
</div>
<div>Thanks for your fast answer. </div>
<div><br>
</div>
<div>From what you're saying it sounds like LibTooling is indeed the place for me to start. I don't want to reinvent the wheel by doing stuff with LibClang for which it wasn't made, so maybe I have to swallow the red pill and dig into LibTooling. I will, however,
 take a final look at LibClang - if the only parts that are missing are the rewriting functions, doing it in Python might still deliver first results faster... </div>
<div><br>
</div>
<div>Having said that, do you know of any efforts to have LibTooling bindings for Python as well? From the tools documentation website I understood that since LibTooling has not (yet?) reached a stable interface, no one bothered to start with one, but you never
 know before you ask ;-) </div></div></blockquote><div><br></div><div>As far as I know nobody is working on python bindings for LibTooling - as we're an open source project, we need to find somebody for whom it's high enough on the prio list to contribute ;)</div>
<div><br></div><div>Cheers,</div><div>/Manuel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="im">
<div><br>
</div>
<div>Regards, </div>
<div><br>
</div>
<div>Michael </div>
<br>
<br>
<br>
-------- Ursprüngliche Nachricht --------<br></div>
Von: Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> <br>
Datum: <br>
An: <a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a> <br>
Cc: "Schlottke, Michael" <<a href="mailto:m.schlottke@fz-juelich.de" target="_blank">m.schlottke@fz-juelich.de</a>>,cfe-dev Developers <<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a>>,Daniel Jasper <<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>>
<br>
Betreff: Re: [cfe-dev] LibTooling vs. LibClang+Python for simple refactoring <br><div><div class="h5">
<br>
<br>
<div>
<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" target="_blank">
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>
<div><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>
</div>
</div></div></div>

</blockquote></div><br></div></div>