Question about contribution

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about contribution

Vassil Vassilev via cfe-dev
Hi cfe-dev,

I've been playing around with clang's frontend and I really appreciate how well documented and noob-friendly it is in order to develop tooling for C++. I see in this page that one of the ideas for new tools is to refactor C-style casts to the appropriate C++ style cast. I'm interested in working on it but I'm not sure where I should contribute it to. I see in clang-tools-extra that there are two ways of adding features, and that is to add the project at the top-level as something like clang-refactor-casts, or to contribute to clang-tidy, particularly the modernize subdirectory which the change for this also fits appropriately in. 

Is there some documentation somewhere that outlines where new contributions for projects of this type should go to? I'd love to help in any way I can :)

- Ray


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Question about contribution

Vassil Vassilev via cfe-dev
Sounds like the sort of thing that'd suit "modernize" - but yeah, some
extra documentation helping describe where things should go might be
handy :)

On Thu, Jun 11, 2020 at 6:32 PM Ray Zhang via cfe-dev
<[hidden email]> wrote:

>
> Hi cfe-dev,
>
> I've been playing around with clang's frontend and I really appreciate how well documented and noob-friendly it is in order to develop tooling for C++. I see in this page that one of the ideas for new tools is to refactor C-style casts to the appropriate C++ style cast. I'm interested in working on it but I'm not sure where I should contribute it to. I see in clang-tools-extra that there are two ways of adding features, and that is to add the project at the top-level as something like clang-refactor-casts, or to contribute to clang-tidy, particularly the modernize subdirectory which the change for this also fits appropriately in.
>
> Is there some documentation somewhere that outlines where new contributions for projects of this type should go to? I'd love to help in any way I can :)
>
> - Ray
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Question about contribution

Vassil Vassilev via cfe-dev
In reply to this post by Vassil Vassilev via cfe-dev


If you go with a clang-tidy check (seems appropriate) you would need to write AST Matchers to find the places in code to transform, and then make transformations at the appropriate source locations.

This gives you a start in the former: http://ce.steveire.com/z/d3njX8

and http://ce.steveire.com/z/qJd39w with the latter and see

 https://steveire.wordpress.com/2019/04/30/the-future-of-ast-matching-refactoring-tools-eurollvm-and-accu/

for more.

Thanks,

Stephen


On 12/06/2020 02:30, Ray Zhang via cfe-dev wrote:
Hi cfe-dev,

I've been playing around with clang's frontend and I really appreciate how well documented and noob-friendly it is in order to develop tooling for C++. I see in this page that one of the ideas for new tools is to refactor C-style casts to the appropriate C++ style cast. I'm interested in working on it but I'm not sure where I should contribute it to. I see in clang-tools-extra that there are two ways of adding features, and that is to add the project at the top-level as something like clang-refactor-casts, or to contribute to clang-tidy, particularly the modernize subdirectory which the change for this also fits appropriately in. 

Is there some documentation somewhere that outlines where new contributions for projects of this type should go to? I'd love to help in any way I can :)

- Ray


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev