[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 7 04:14:05 PST 2026
vbvictor wrote:
Thank you for the investigation and report! As it appears, someone else too had similar issues (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 https://github.com/llvm/llvm-project/issues/148819, https://github.com/llvm/llvm-project/issues/148814) which we should hopefully fix eventually.
If you wish, please open PR with the hotfix; otherwise, I'll try to do it (hopefully before 22th branching take place)
------------------------------------
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`
https://github.com/llvm/llvm-project/pull/131804
More information about the cfe-commits
mailing list