Question about contribution

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 :slight_smile:

  • Ray

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

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:

and with the latter and see

for more.