On Organization/Placement of Tools for Clang-Tidy

Hello,

I’m working with a few other developers on creating a clang tool. This tool is meant to help out with the development of clang-tidy checks (specifically to help with writing matchers).

Currently, the tool is contained as a single folder within the clang/tools/extra directory. However, we realized that several other tools seem to be located outside of clang extra, in clang/lib or clang/lib/tooling.

Given this, we had a quick question: should we move our tool to clang/lib, keep it in clang/tools/extra, or place it somewhere else? Or, does the placement not matter that much?

Sincerely,
Shyan

I'm also working on tooling to help writing matchers:

eg:

Future Developments in clang-query | Steveire's Blog

Refactor with Clang Tooling at code::dive 2018 | Steveire's Blog

Is there overlap there in what you are doing?

Thanks,

Stephen

See the thread “[cfe-dev] Separating clang-tools-extra from clang in LLVM_ENABLE_PROJECTS” as well.

What tool is it and how does it help? Did you notice the “[cfe-dev] [RFC] Easier source-to-source transformations with clang tooling” thread here proposing a better matching&transforming API?

There’s no (direct) overlap with the latter proposal (my own), although we should think about how to integrate them. My proposal leaves separate the challenge of writing matchers, so this would be a nice addition for users. I suspect there’s significant overlap with Stephen’s work, although I think they’re targeting a somewhat different interface with the tool.

Shyan – do you have an overview of your tool that you could share with us?

Hi everyone,

Sorry for the delayed response, and thank you for all of the helpful links.

We have a brief overview of our tool available here. The motivation for this tool is similar to that of other proposals (making the process of writing matchers / checks easier in clang-tidy), but the specific functionality we’re proposing is different.

Sincerely,
Shyan

Hi everyone,

Sorry for the delayed response, and thank you for all of the helpful links.

We have a brief overview of our tool available here. The motivation for this tool is similar to that of other proposals (making the process of writing matchers / checks easier in clang-tidy), but the specific functionality we’re proposing is different.

Your abstract looks awesome - I’ve been waiting for somebody to attempt this for ~8 years now :slight_smile:
I’d keep it in extra for now, and migrate it to clang proper once it becomes successful enough.