[cfe-dev] clang-refactoring tool proposal

Kirill Bobyrev via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 17 01:27:16 PDT 2016


Hi Alexander and Krzysztof,

Thank you for your interest!

Please find my comment inline.

On Sun, Aug 14, 2016 at 4:36 PM, Krzysztof Wiśniewski <
k.k.wisniewski1 at gmail.com> wrote:

> Hi everyone!
>
> I've just started to search for some open-source project to join because
> a) I want to re-learn C++ (there have been a few years since I've used it)
> b) need some topic for my masters thesis
>
> The tool Kirill proposes sounds like a good opportunity for me to join -
> as far as I understand, it does not exist yet and there seems to be a
> community that is interested in using it when it's done. Do you have any
> timeline when the planning and development could kick-off? Are there any
> discussions/docs I should go through first? If you think I should start by
> doing some bugs in other clang-related projects let me know.
>
> As soon as design docs look fine for me. I am currently working on design
docs and I hope to finish them soon. There will be enough info about
everything in these docs. Feedback on them will be highly appreciated.

Yes, it does not exist in upstream yet, there's a "demo" that I have, but
it's still very basic one. I don't have any timeline, but I hope to get
design docs to public by the end of this week.

I suppose there'll be a lot of work in that direction, so feedback and
contributions are always nice!

By the way, there's a page about Open Projects @ Clang
<http://clang.llvm.org/OpenProjects.html> if you are interested.

> Best regards,
>
> Chris Wisniewski
>
> On Sun, Aug 14, 2016 at 12:11 PM Alexander Droste via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> 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
>> >
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>


-- 
Best regards,
Kirill Bobyrev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160817/1b0c201e/attachment.html>


More information about the cfe-dev mailing list