diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2018-09-30 17:39:39 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2018-09-30 17:39:39 +0000 |
commit | 2eaec12731ae3eb703f9a0df5350f4583e7706fb (patch) | |
tree | e21a717e4ddb8e77178110d81762710c60b96921 /clang-tools-extra/clang-tidy | |
parent | d14b882959d9d743e8396983cdc698a03bb1a12f (diff) |
Reverting r343415 as it breaks at least one of the bots.
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/37336
Diffstat (limited to 'clang-tools-extra/clang-tidy')
-rw-r--r-- | clang-tools-extra/clang-tidy/CMakeLists.txt | 13 | ||||
-rw-r--r-- | clang-tools-extra/clang-tidy/ClangTidy.cpp | 10 | ||||
-rw-r--r-- | clang-tools-extra/clang-tidy/plugin/CMakeLists.txt | 7 | ||||
-rw-r--r-- | clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp | 2 | ||||
-rw-r--r-- | clang-tools-extra/clang-tidy/tool/CMakeLists.txt | 7 | ||||
-rw-r--r-- | clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp | 2 |
6 files changed, 5 insertions, 36 deletions
diff --git a/clang-tools-extra/clang-tidy/CMakeLists.txt b/clang-tools-extra/clang-tidy/CMakeLists.txt index 0037268a15b..a872469429c 100644 --- a/clang-tools-extra/clang-tidy/CMakeLists.txt +++ b/clang-tools-extra/clang-tidy/CMakeLists.txt @@ -21,17 +21,12 @@ add_clang_library(clangTidy clangLex clangRewrite clangSema + clangStaticAnalyzerCore + clangStaticAnalyzerFrontend clangTooling clangToolingCore ) -if(CLANG_ENABLE_STATIC_ANALYZER) - target_link_libraries(clangTidy PRIVATE - clangStaticAnalyzerCore - clangStaticAnalyzerFrontend - ) -endif() - add_subdirectory(android) add_subdirectory(abseil) add_subdirectory(boost) @@ -44,9 +39,7 @@ add_subdirectory(hicpp) add_subdirectory(llvm) add_subdirectory(misc) add_subdirectory(modernize) -if(CLANG_ENABLE_STATIC_ANALYZER) - add_subdirectory(mpi) -endif() +add_subdirectory(mpi) add_subdirectory(objc) add_subdirectory(performance) add_subdirectory(plugin) diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp index d78e5abadc9..d9eb1a51165 100644 --- a/clang-tools-extra/clang-tidy/ClangTidy.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp @@ -34,10 +34,8 @@ #include "clang/Lex/Preprocessor.h" #include "clang/Rewrite/Frontend/FixItRewriter.h" #include "clang/Rewrite/Frontend/FrontendActions.h" -#if CLANG_ENABLE_STATIC_ANALYZER #include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h" #include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h" -#endif // CLANG_ENABLE_STATIC_ANALYZER #include "clang/Tooling/DiagnosticsYaml.h" #include "clang/Tooling/Refactoring.h" #include "clang/Tooling/ReplacementsYaml.h" @@ -58,7 +56,6 @@ namespace clang { namespace tidy { namespace { -#if CLANG_ENABLE_STATIC_ANALYZER static const char *AnalyzerCheckNamePrefix = "clang-analyzer-"; class AnalyzerDiagnosticConsumer : public ento::PathDiagnosticConsumer { @@ -90,7 +87,6 @@ public: private: ClangTidyContext &Context; }; -#endif // CLANG_ENABLE_STATIC_ANALYZER class ErrorReporter { public: @@ -300,7 +296,6 @@ ClangTidyASTConsumerFactory::ClangTidyASTConsumerFactory( } } -#if CLANG_ENABLE_STATIC_ANALYZER static void setStaticAnalyzerCheckerOpts(const ClangTidyOptions &Opts, AnalyzerOptionsRef AnalyzerOptions) { StringRef AnalyzerPrefix(AnalyzerCheckNamePrefix); @@ -344,7 +339,6 @@ static CheckersList getCheckersControlList(ClangTidyContext &Context, } return List; } -#endif // CLANG_ENABLE_STATIC_ANALYZER std::unique_ptr<clang::ASTConsumer> ClangTidyASTConsumerFactory::CreateASTConsumer( @@ -386,7 +380,6 @@ ClangTidyASTConsumerFactory::CreateASTConsumer( if (!Checks.empty()) Consumers.push_back(Finder->newASTConsumer()); -#if CLANG_ENABLE_STATIC_ANALYZER AnalyzerOptionsRef AnalyzerOptions = Compiler.getAnalyzerOpts(); AnalyzerOptions->CheckersControlList = getCheckersControlList(Context, Context.canEnableAnalyzerAlphaCheckers()); @@ -402,7 +395,6 @@ ClangTidyASTConsumerFactory::CreateASTConsumer( new AnalyzerDiagnosticConsumer(Context)); Consumers.push_back(std::move(AnalysisConsumer)); } -#endif // CLANG_ENABLE_STATIC_ANALYZER return llvm::make_unique<ClangTidyASTConsumer>( std::move(Consumers), std::move(Profiling), std::move(Finder), std::move(Checks)); @@ -415,11 +407,9 @@ std::vector<std::string> ClangTidyASTConsumerFactory::getCheckNames() { CheckNames.push_back(CheckFactory.first); } -#if CLANG_ENABLE_STATIC_ANALYZER for (const auto &AnalyzerCheck : getCheckersControlList( Context, Context.canEnableAnalyzerAlphaCheckers())) CheckNames.push_back(AnalyzerCheckNamePrefix + AnalyzerCheck.first); -#endif // CLANG_ENABLE_STATIC_ANALYZER std::sort(CheckNames.begin(), CheckNames.end()); return CheckNames; diff --git a/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt b/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt index 7a12d7fd599..3540b2be712 100644 --- a/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt +++ b/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt @@ -20,6 +20,7 @@ add_clang_library(clangTidyPlugin clangTidyLLVMModule clangTidyMiscModule clangTidyModernizeModule + clangTidyMPIModule clangTidyObjCModule clangTidyPerformanceModule clangTidyPortabilityModule @@ -27,9 +28,3 @@ add_clang_library(clangTidyPlugin clangTidyZirconModule clangTooling ) - -if(CLANG_ENABLE_STATIC_ANALYZER) - target_link_libraries(clangTidyPlugin PRIVATE - clangTidyMPIModule - ) -endif() diff --git a/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp b/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp index f998d6a5a4d..34556120553 100644 --- a/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp +++ b/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp @@ -133,12 +133,10 @@ extern volatile int ModernizeModuleAnchorSource; static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination = ModernizeModuleAnchorSource; -#if CLANG_ENABLE_STATIC_ANALYZER // This anchor is used to force the linker to link the MPIModule. extern volatile int MPIModuleAnchorSource; static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination = MPIModuleAnchorSource; -#endif // This anchor is used to force the linker to link the ObjCModule. extern volatile int ObjCModuleAnchorSource; diff --git a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt index f58cfea5518..a3ec4ae755c 100644 --- a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt +++ b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt @@ -29,6 +29,7 @@ target_link_libraries(clang-tidy clangTidyLLVMModule clangTidyMiscModule clangTidyModernizeModule + clangTidyMPIModule clangTidyObjCModule clangTidyPerformanceModule clangTidyPortabilityModule @@ -38,12 +39,6 @@ target_link_libraries(clang-tidy clangToolingCore ) -if(CLANG_ENABLE_STATIC_ANALYZER) - target_link_libraries(clang-tidy PRIVATE - clangTidyMPIModule - ) -endif() - install(PROGRAMS clang-tidy-diff.py DESTINATION share/clang COMPONENT clang-tidy) diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp index fa864e8243f..b458b293157 100644 --- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp +++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp @@ -534,12 +534,10 @@ extern volatile int ModernizeModuleAnchorSource; static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination = ModernizeModuleAnchorSource; -#if CLANG_ENABLE_STATIC_ANALYZER // This anchor is used to force the linker to link the MPIModule. extern volatile int MPIModuleAnchorSource; static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination = MPIModuleAnchorSource; -#endif // This anchor is used to force the linker to link the PerformanceModule. extern volatile int PerformanceModuleAnchorSource; |