File tree 9 files changed +2
-139
lines changed
9 files changed +2
-139
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,11 @@ clang_target_link_libraries(clangTidyMain
29
29
clangToolingCore
30
30
)
31
31
32
- # Support plugins.
33
- if (CLANG_PLUGIN_SUPPORT)
34
- set (support_plugins SUPPORT_PLUGINS)
35
- endif ()
36
-
37
32
add_clang_tool(clang-tidy
38
33
ClangTidyToolMain.cpp
39
-
40
- DEPENDS
34
+ )
35
+ add_dependencies (clang-tidy
41
36
clang-resource -headers
42
- ${support_plugins}
43
37
)
44
38
clang_target_link_libraries(clang-tidy
45
39
PRIVATE
@@ -56,9 +50,6 @@ target_link_libraries(clang-tidy
56
50
${ALL_CLANG_TIDY_CHECKS}
57
51
)
58
52
59
- if (CLANG_PLUGIN_SUPPORT)
60
- export_executable_symbols_for_plugins(clang-tidy)
61
- endif ()
62
53
63
54
install (PROGRAMS clang-tidy-diff.py
64
55
DESTINATION "${CMAKE_INSTALL_DATADIR} /clang"
Original file line number Diff line number Diff line change 20
20
#include " ../GlobList.h"
21
21
#include " clang/Tooling/CommonOptionsParser.h"
22
22
#include " llvm/Support/InitLLVM.h"
23
- #include " llvm/Support/PluginLoader.h"
24
23
#include " llvm/Support/Process.h"
25
24
#include " llvm/Support/Signals.h"
26
25
#include " llvm/Support/TargetSelect.h"
@@ -387,11 +386,6 @@ getVfsFromFile(const std::string &OverlayFile,
387
386
388
387
int clangTidyMain (int argc, const char **argv) {
389
388
llvm::InitLLVM X (argc, argv);
390
-
391
- // Enable help for -load option, if plugins are enabled.
392
- if (cl::Option *LoadOpt = cl::getRegisteredOptions ().lookup (" load" ))
393
- LoadOpt->addCategory (ClangTidyCategory);
394
-
395
389
llvm::Expected<CommonOptionsParser> OptionsParser =
396
390
CommonOptionsParser::create (argc, argv, ClangTidyCategory,
397
391
cl::ZeroOrMore);
Original file line number Diff line number Diff line change @@ -76,8 +76,6 @@ Improvements to clang-tidy
76
76
- Added support for `NOLINTBEGIN ` ... `NOLINTEND ` comments to suppress
77
77
Clang-Tidy warnings over multiple lines.
78
78
79
- - Added support for external plugin checks with `-load `.
80
-
81
79
New checks
82
80
^^^^^^^^^^
83
81
Original file line number Diff line number Diff line change @@ -634,26 +634,6 @@ This keeps the test directory from getting cluttered.
634
634
.. _FileCheck : https://llvm.org/docs/CommandGuide/FileCheck.html
635
635
.. _test/clang-tidy/google-readability-casting.cpp : https://reviews.llvm.org/diffusion/L/browse/clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.cpp
636
636
637
- Out-of-tree check plugins
638
- -------------------------
639
-
640
- Developing an out-of-tree check as a plugin largely follows the steps
641
- outlined above. The plugin is a shared library whose code lives outside
642
- the clang-tidy build system. Build and link this shared library against
643
- LLVM as done for other kinds of Clang plugins.
644
-
645
- The plugin can be loaded by passing `-load ` to `clang-tidy ` in addition to the
646
- names of the checks to enable.
647
-
648
- .. code-block :: console
649
-
650
- $ clang-tidy --checks=-*,my-explicit-constructor -list-checks -load myplugin.so
651
-
652
- There is no expectations regarding ABI and API stability, so the plugin must be
653
- compiled against the version of clang-tidy that will be loading the plugin.
654
-
655
- The plugins can use threads, TLS, or any other facilities available to in-tree
656
- code which is accessible from the external headers.
657
637
658
638
Running clang-tidy on LLVM
659
639
--------------------------
Original file line number Diff line number Diff line change @@ -218,15 +218,6 @@ An overview of all the command-line options:
218
218
--list-checks -
219
219
List all enabled checks and exit. Use with
220
220
-checks=* to list all available checks.
221
- -load=<plugin> -
222
- Load the dynamic object ``plugin``. This
223
- object should register new static analyzer
224
- or clang-tidy passes. Once loaded, the
225
- object will add new command line options
226
- to run various analyses. To see the new
227
- complete list of passes, use the
228
- :option:`--list-checks` and
229
- :option:`-load` options together.
230
221
-p=<string> - Build path
231
222
--quiet -
232
223
Run clang-tidy in quiet mode. This suppresses
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUN
17
17
18
18
llvm_canonicalize_cmake_booleans(
19
19
CLANG_TIDY_ENABLE_STATIC_ANALYZER
20
- LLVM_ENABLE_PLUGINS
21
20
)
22
21
23
22
configure_lit_site_cfg(
@@ -79,22 +78,6 @@ foreach(dep ${LLVM_UTILS_DEPS})
79
78
endif ()
80
79
endforeach ()
81
80
82
- llvm_add_library(
83
- CTTestTidyModule
84
- MODULE clang-tidy/CTTestTidyModule.cpp
85
- PLUGIN_TOOL clang-tidy
86
- DEPENDS clang-tidy-headers)
87
-
88
- if (TARGET CTTestTidyModule)
89
- list (APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello)
90
- target_include_directories (CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR} " )
91
- if (LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN ))
92
- set (LLVM_LINK_COMPONENTS
93
- Support
94
- )
95
- endif ()
96
- endif ()
97
-
98
81
add_lit_testsuite(check-clang-tools "Running the Clang extra tools' regression tests"
99
82
${CMAKE_CURRENT_BINARY_DIR}
100
83
DEPENDS ${CLANG_TOOLS_TEST_DEPS}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 149
149
"clangd" , "benchmarks" )
150
150
config .substitutions .append (('%clangd-benchmark-dir' ,
151
151
'%s' % (clangd_benchmarks_dir )))
152
- config .substitutions .append (('%llvmshlibdir' , config .clang_libs_dir ))
153
- config .substitutions .append (('%pluginext' , config .llvm_plugin_ext ))
154
-
155
- # Plugins (loadable modules)
156
- if config .has_plugins and config .llvm_plugin_ext :
157
- config .available_features .add ('plugins' )
Original file line number Diff line number Diff line change @@ -4,15 +4,13 @@ import sys
4
4
5
5
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
6
6
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
7
- config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
8
7
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
9
8
config.clang_tools_binary_dir = "@CLANG_TOOLS_BINARY_DIR@"
10
9
config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
11
10
config.clang_libs_dir = "@SHLIBDIR@"
12
11
config.python_executable = "@Python3_EXECUTABLE@"
13
12
config.target_triple = "@TARGET_TRIPLE@"
14
13
config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@
15
- config.has_plugins = @LLVM_ENABLE_PLUGINS@
16
14
17
15
# Support substitution of the tools and libs dirs with user parameters. This is
18
16
# used when we can't determine the tool dir at configuration time.
You can’t perform that action at this time.
0 commit comments