[clang-tools-extra] [clang-tidy] Add ClangQueryChecks config option (PR #123734)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 21 09:14:49 PST 2025
================
@@ -292,6 +292,18 @@ An overview of all the command-line options:
Checks - Same as '--checks'. Additionally, the list of
globs can be specified as a list instead of a
string.
+ ClangQueryChecks - List of key-value pairs. Key specifies a name
+ of the new check and value specifies a list
+ of matchers in the form of clang-query
+ syntax. Example:
+ ClangQueryChecks:
+ custom-check: |
+ let matcher varDecl(
+ hasTypeLoc(
+ typeLoc().bind("Custom message")
----------------
PiotrZSL wrote:
what if i want to get "name of fuction" in output message ?
or write check with multiple "bind" by simply using equalsBoundNode ?
Or generate "note"
https://github.com/llvm/llvm-project/pull/123734
More information about the cfe-commits
mailing list