[clang-tools-extra] [clang-tidy] Add MLIR check for old op builder usage. (PR #149148)
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 26 07:38:22 PDT 2025
mgorny wrote:
Oh, I think I know what's wrong here.
```diff
diff --git a/clang-tools-extra/clang-tidy/llvm/CMakeLists.txt b/clang-tools-extra/clang-tidy/llvm/CMakeLists.txt
index 3232f6e2cafe..4f1da43d3f1b 100644
--- a/clang-tools-extra/clang-tidy/llvm/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/llvm/CMakeLists.txt
@@ -11,11 +11,13 @@ add_clang_library(clangTidyLLVMModule STATIC
PreferRegisterOverUnsignedCheck.cpp
PreferStaticOverAnonymousNamespaceCheck.cpp
TwineLocalCheck.cpp
+ UseNewMLIROpBuilderCheck.cpp
LINK_LIBS
clangTidy
clangTidyReadabilityModule
clangTidyUtils
+ clangTransformer
DEPENDS
omp_gen
```
My guess is that you're bypassing the dylib, and effectively the executables end up linking both dylib and all static libraries, which is a recipe for disaster.
https://github.com/llvm/llvm-project/pull/149148
More information about the cfe-commits
mailing list