[clang-tools-extra] 022920c - [clangd] Retire clang-tidy-checks flag.
Nathan James via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 13 06:14:34 PST 2021
Author: Nathan James
Date: 2021-02-13T14:14:22Z
New Revision: 022920c25b8eb90b0bd0d209a9d0f836743a21bb
URL: https://github.com/llvm/llvm-project/commit/022920c25b8eb90b0bd0d209a9d0f836743a21bb
DIFF: https://github.com/llvm/llvm-project/commit/022920c25b8eb90b0bd0d209a9d0f836743a21bb.diff
LOG: [clangd] Retire clang-tidy-checks flag.
In clangd-12 the ability to override what clang tidy checks should run was moved into config.
For the 13 release its a wise progression to remove the command line option for this.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D96508
Added:
Modified:
clang-tools-extra/clangd/tool/ClangdMain.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index 595cbcf80d51..51280b73afac 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -172,14 +172,6 @@ opt<bool> EnableClangTidy{
init(true),
};
-opt<std::string> ClangTidyChecks{
- "clang-tidy-checks",
- cat(Features),
- desc("List of clang-tidy checks to run (this will override "
- ".clang-tidy files). Only meaningful when -clang-tidy flag is on"),
- init(""),
-};
-
opt<CodeCompleteOptions::CodeCompletionParse> CodeCompletionParse{
"completion-parse",
cat(Features),
@@ -287,6 +279,7 @@ RetiredFlag<bool> RecoveryASTType("recovery-ast-type");
RetiredFlag<bool> AsyncPreamble("async-preamble");
RetiredFlag<bool> CollectMainFileRefs("collect-main-file-refs");
RetiredFlag<bool> CrossFileRename("cross-file-rename");
+RetiredFlag<std::string> ClangTidyChecks("clang-tidy-checks");
opt<int> LimitResults{
"limit-results",
@@ -826,10 +819,7 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
Providers.push_back(provideClangTidyFiles(TFS));
if (EnableConfig)
Providers.push_back(provideClangdConfig());
- if (!ClangTidyChecks.empty())
- Providers.push_back(addTidyChecks(ClangTidyChecks));
- else
- Providers.push_back(provideDefaultChecks());
+ Providers.push_back(provideDefaultChecks());
Providers.push_back(disableUnusableChecks());
ClangTidyOptProvider = combine(std::move(Providers));
Opts.ClangTidyProvider = ClangTidyOptProvider;
More information about the cfe-commits
mailing list