[clang-tools-extra] [clang-tidy] Fix loading clang-tidy as a Clang frontend plugin (PR #221961)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 8 04:36:25 PDT 2026


================
@@ -79,10 +90,5 @@ class ClangTidyPluginAction : public PluginASTAction {
 } // namespace
 } // namespace clang::tidy
 
-// This anchor is used to force the linker to link in the generated object file
-// and thus register the clang-tidy plugin.
-// NOLINTNEXTLINE(misc-use-internal-linkage)
-volatile int ClangTidyPluginAnchorSource = 0;
----------------
zeyi2 wrote:

It was used to pull the plugin into libclang from a static archive. That integration was removed in [da113f3202ba](https://github.com/llvm/llvm-project/commit/da113f3202bafb6ecb0a5e51c741e49b7681a91f). So it is no longer needed.

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


More information about the cfe-commits mailing list