[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 19 07:01:19 PDT 2025


================
@@ -0,0 +1,20 @@
+set(LLVM_LINK_COMPONENTS
+  support
+  )
+
+add_clang_library(clangTidyCustomModule STATIC
+  CustomTidyModule.cpp
+  QueryCheck.cpp
+
+  LINK_LIBS
+  clangTidy
+  clangTidyUtils
+
+  DEPENDS
+  ClangDriverOptions
+  )
+
+clang_target_link_libraries(clangTidyCustomModule
+  PRIVATE
+  clangQuery
----------------
PiotrZSL wrote:

Probably would be fine, would be good to have cmake options, to enable custom checks, and then if not enabled then support for them woudn't be included in binary

https://github.com/llvm/llvm-project/pull/131804


More information about the cfe-commits mailing list