[cfe-dev] clang-refactoring tool proposal

Alexander Droste via cfe-dev cfe-dev at lists.llvm.org
Sun Aug 14 03:14:16 PDT 2016


Hi,

like everyone else, I think improved refactoring capabilities
in clang would be pretty exciting. This is something I would
really like to work on. So if there's interest to delegate
some chunks of work I'd like to help.

-Alex

On 11.08.16 14:01, Kirill Bobyrev via cfe-dev wrote:
> Ben, Milian,
>
> Thank you for the feedback!
>
> On Wed, Aug 10, 2016 at 12:59 PM, Milian Wolff via cfe-dev
> <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
>
>     On Mittwoch, 10. August 2016 00:06:46 CEST Ben Jackson via cfe-dev wrote:
>     > First, I think clang-refactor is a great idea and a great point of focus for
>     > really useful tools.
>     > > 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.
>     > >
>     > > A properly designed clang-refactor tool would be able to process multiple
>     > > Translation Units, which is crucial for all mentioned refactoring.
>     >
>     > As a maintainer of a code comprehension tool which uses libclang, it would
>     > be really useful if such a refactoring ability was exposed via the
>     > higher-level APIs. We’d *love* to have IDE-like refactoring for C/C++/etc.
>     > in the tool, and I’m sure our users would too :).
>     >
>     > One of the challenges we have with clang-rename, clang-include-fixer etc. is
>     > that they are difficult to integrate with existing applications which use
>     > libclang. Or perhaps I should say, they require orthogonal integration -
>     > currently to integrate these tools, even though I have successfully
>     > generated a TU/AST etc., I have to shell out to a binary which users may or
>     > may not have installed.
>
> That's true. Clang-refactor should consider making the interface to all of the
> subtools more or less uniform.
>
>     >
>     > I know that is probably complex to deliver in practice, and I understand
>     > that the maintainers may have different opinions on the scope of libclang
>     > (or even the scope of this discussion!), but I wanted to throw the idea out
>     > there, in case there is appetite. Certainly, I would be super excited to
>     > integrate these tools into ycmd/YouCompleteMe. I don’t doubt others would
>     > similarly benefit.
>
> Yes, ycmd and YCM are very good things to integrate into, but I think that
> shouldn't be the only focus, i.e. a good high-level API should provide a nice
> and easy way of integration to any other third-party projects, too.
>
>
>     I can only second the above. KDevelop is in exactly the same position, and I
>     bet lots of other tools out there are as well. Just think of the potential
>     time that can be saved by handing in an existing TU instead of having to parse
>     that yet again.
>
>     Cheers
>
>     --
>     Milian Wolff
>     mail at milianw.de <mailto:mail at milianw.de>
>     http://milianw.de
>     _______________________________________________
>     cfe-dev mailing list
>     cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
>     http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>     <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev>
>
>
>
> --
> Best regards,
> Kirill Bobyrev
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list