<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Oops, didn’t actually CC people.<div class=""><br class=""><div class="">+CC: Saleem Abdulrasool, Manuel Klimek, Alexander Kornienko</div><div class=""><br class=""></div><div class=""><div class=""><div><blockquote type="cite" class=""><div class="">On 09 Aug 2016, at 19:27, Piotr Padlewski via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I think that clang-refactor is a good idea.</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Aug 9, 2016 at 8:52 AM, Kirill Bobyrev via cfe-dev <span dir="ltr" class=""><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Thanks to Saleem Abdulrasool for originally proposing this approach in the mentioned discussion.<div class="">+CC: Saleem Abdulrasool</div></div><div class="gmail_extra"><div class=""><div class="h5"><br class=""><div class="gmail_quote">On Tue, Aug 9, 2016 at 2:07 PM, Kirill Bobyrev <span dir="ltr" class=""><<a href="mailto:kbobyrev@google.com" target="_blank" class="">kbobyrev@google.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="">Hi everyone!</div><div class=""><br class=""></div><div class="">As you know we have several useful Clang-based tools: clang-format for code formatting, clang-tidy for for diagnosing and fixing typical programming errors, clang-include-fixer for automatic management of #include directives and a few others.</div><div class=""><br class=""></div><div class="">I am working on clang-rename, whose purpose is to perform efficient renaming actions in large-scale projects such as renaming classes, functions, variables, arguments, namespaces etc. It is clearly meant for refactoring code and doesn’t fit into any of above mentioned tools. And at this point we only have clang-rename for code refactoring.</div><div class=""><br class=""></div><div class="">However, there are many other interesting refactoring actions, which are typically provided by third-party editor plugins or IDEs (and which we ideally would like to have), such as:</div><div class=""><br class=""></div><div class="">* Extract method</div><div class="">* Inline local variable, method or constant</div><div class="">* Change method signature</div><div class=""><br class=""></div><div class="">And many others. For a sample list of some popular refactoring techniques see Eclipse Refactorings list (<a href="http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-menu-refactor.htm" target="_blank" class="">http://help.eclipse.org/neon/<wbr class="">index.jsp?topic=%2Forg.eclipse<wbr class="">.jdt.doc.user%2Freference%<wbr class="">2Fref-menu-refactor.htm</a>) and ReSharper C++ Refactoring (<a href="https://www.jetbrains.com/resharper-cpp/features/#refactorings" target="_blank" class="">https://www.jetbrains.com/res<wbr class="">harper-cpp/features/#refactori<wbr class="">ngs</a>).</div><div class=""><br class=""></div><div class="">We recently had a related short discussion in <a href="https://reviews.llvm.org/D23279" target="_blank" class="">https://reviews.llvm.org/D2327<wbr class="">9</a>, which introduced a simple tool for field reordering. The main point is that neither clang-rename nor clang-tidy are a good place for such a tool, but we don’t want to end up with too many binaries in clang-tools-extra, too.</div><div class=""><br class=""></div><div class="">My proposed solution is to create clang-refactor tool, which would be an “umbrella” for other refactoring modules. A prototype of clang-refactor would merge clang-rename inside of it and other modules and refactorings would be added later.</div><div class=""><br class=""></div><div class="">A properly designed clang-refactor tool would be able to process multiple Translation Units, which is crucial for all mentioned refactorings.</div><div class=""><br class=""></div><div class="">I am very excited about the idea of having Clang-based refactoring tool and I see a lot of potential in it.</div><div class=""><br class=""></div><div class="">I want to bring up a Community discussion and get feedback on these ideas.</div><div class=""><br class=""></div><div class="">Best regards,</div><div class="">Kirill Bobyrev</div>
</div>
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div></div></div><span class="HOEnZb"><font color="#888888" class="">-- <br class=""><div class="m_7620110871294586240gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class="">Best regards,<div class="">Kirill Bobyrev</div></div></div>
</font></span></div>
<br class="">______________________________<wbr class="">_________________<br class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/cfe-dev</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></div></div></div></body></html>