[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 15 23:52:54 PDT 2025
================
@@ -0,0 +1,63 @@
+====================================
+Query Based Custom Clang-Tidy Checks
+====================================
+
+Introduction
+============
+
+This page provides examples of how to add query based custom checks for
+:program:`clang-tidy`.
+
+Custom checks are based on :program:`clang-query` syntax. Every custom checks
----------------
vbvictor wrote:
Off-topic:
How can a user find this `clang-query` syntax? When I search in google, all I can find is [firefox link on how to use clang-query](https://firefox-source-docs.mozilla.org/code-quality/static-analysis/writing-new/clang-query.html) (thanks to them!) and [ast-matchers reference](https://clang.llvm.org/docs/LibASTMatchersReference.html) that has `clang-query` word written only once.
I think we should try to write a small official doc about `clang-query` because now it became a user-facing tool unlike an internal developer tool.
https://github.com/llvm/llvm-project/pull/131804
More information about the cfe-commits
mailing list