[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 20 07:09:36 PDT 2025
AaronBallman wrote:
> > Hi, I tried to explain everything here:
>
> Thanks, I missed that! For RFCs it's preferable to use [Discourse](https://discourse.llvm.org/c/clang/clang-tidy/71), as there is a lot less traffic and can more easily catch the eyes of relevant people. I did not see much discussion in the original RFC though, which may hint that not many people were aware.
Yeah, that Discourse thread is really too recent to know whether the community wants the extension or not. I think the RFC should run longer before we move forward.
> My understanding is that the goal is to avoid rebuilding clang-tidy/plugins to be able to add new simple checks via .clang-tidy file. I see the benefit of this, however I'm not sure it justifies introducing this dependency from `clang-tidy` to `clang-query` in the build system.
+1; it sounds like the goal is somewhat less about clang-tidy checks and more about running code transformations more easily. clang-query doesn't really lend itself to "find this pattern, replace with this other pattern", and clang-tidy requires enough boilerplate for checks that it's a heavy-handed solution. It might make more sense to design a tool specific for code transformations -- something that can be easily run over a compile_commands.json file, for example.
https://github.com/llvm/llvm-project/pull/131804
More information about the cfe-commits
mailing list