[clang-tools-extra] d8ef7b6 - [clang-tidy] Stop linking against clangSema (#113373)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 23 09:37:42 PDT 2024


Author: Vlad Serebrennikov
Date: 2024-10-23T20:37:38+04:00
New Revision: d8ef7b67e84145275682185905fcdfd938fe08ce

URL: https://github.com/llvm/llvm-project/commit/d8ef7b67e84145275682185905fcdfd938fe08ce
DIFF: https://github.com/llvm/llvm-project/commit/d8ef7b67e84145275682185905fcdfd938fe08ce.diff

LOG: [clang-tidy] Stop linking against clangSema (#113373)

This is bad layering-wise. The only fix needed now is to anchor
`SemaConsumer` vtable, which is also done in this patch.

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/CMakeLists.txt
    clang-tools-extra/clang-tidy/ClangTidy.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/CMakeLists.txt b/clang-tools-extra/clang-tidy/CMakeLists.txt
index 83a3236131dc93..93117cf1d6373a 100644
--- a/clang-tools-extra/clang-tidy/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/CMakeLists.txt
@@ -35,7 +35,6 @@ clang_target_link_libraries(clangTidy
   clangFrontend
   clangLex
   clangRewrite
-  clangSema
   clangSerialization
   clangTooling
   clangToolingCore

diff  --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp
index c4cac7d27b77c2..9c8c93c5d16c72 100644
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
@@ -336,6 +336,7 @@ class ClangTidyASTConsumer : public MultiplexConsumer {
   std::unique_ptr<ClangTidyProfiling> Profiling;
   std::unique_ptr<ast_matchers::MatchFinder> Finder;
   std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
+  void anchor() override {};
 };
 
 } // namespace


        


More information about the cfe-commits mailing list