[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 9 04:46:59 PST 2026
steakhal wrote:
> Thank you for the investigation and report! As it appears, someone else too had similar issues ([#159547 (comment)](https://github.com/llvm/llvm-project/pull/159547#issuecomment-3524039290)).
>
> Since the issue is inside the Tooling library (which clang-tidy is consumer of), it may require some effort and time to fix properly. There is some issues considering weird behavior with compiler database (like #148819, #148814) which we should hopefully fix eventually.
Thank you for these cross-refs.
> If you wish, please open PR with the hotfix; otherwise, I'll try to do it (hopefully before 22th branching take place)
I don't think I have the bandwidth. And now that we disabled the test, it's not urgent for us, and I don't want to impose deadlines or urgency on anyone. It's fine by me if it's eventually fixed, or just worked around in the affected test for now.
> I wonder if changing the name of test file from `main.cpp` to something unique like `clang-tidy-query.cpp` will solve the issue because the algorithm will fail to find flags for non-existent file in `compile_commands.json`
I don't think it changes anything because currently it randomly picks a 0 scored TU - regardless of the file name AFAIK.
https://github.com/llvm/llvm-project/pull/131804
More information about the cfe-commits
mailing list