[clang-tools-extra] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 10 04:36:14 PST 2025
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306
>From 534a01ffbe47efe528e3ef2f509aefb9cb16119a Mon Sep 17 00:00:00 2001
From: Victor Baranov <bar.victor.2002 at gmail.com>
Date: Thu, 2 Oct 2025 23:25:16 +0300
Subject: [PATCH 1/2] [clang-tidy] Remove 'clang-analyzer-*' checks from
default checks
---
clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp | 3 +--
clang-tools-extra/docs/ReleaseNotes.rst | 8 ++++++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
index 64157f530b8c0..c72185feba5c5 100644
--- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
+++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
@@ -104,8 +104,7 @@ Configuration files:
)");
const char DefaultChecks[] = // Enable these checks by default:
- "clang-diagnostic-*," // * compiler diagnostics
- "clang-analyzer-*"; // * Static Analyzer checks
+ "clang-diagnostic-*"; // * compiler diagnostics
static cl::opt<std::string> Checks("checks", desc(R"(
Comma-separated list of globs with optional '-'
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index 62e1987377989..78d80867fb103 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -54,6 +54,10 @@ Potentially Breaking Changes
:program:`clang-tidy-20`. Users should use the check-specific options of the
same name instead.
+- Removed `clang-analyzer-*` check from default checks in :program:`clang-tidy`.
+ From now on, users should specify explicitly that they want CSA checks to run
+ in :program:`clang-tidy`.
+
- Renamed :program:`clang-tidy`'s option name of check
:doc:`bugprone-easily-swappable-parameters
<clang-tidy/checks/bugprone/easily-swappable-parameters>` from
@@ -158,6 +162,10 @@ Improvements to clang-tidy
scripts by adding the `-hide-progress` option to suppress progress and
informational messages.
+- Removed `clang-analyzer-*` check from default checks in :program:`clang-tidy`.
+ From now on, users should specify explicitly that they want CSA checks to run
+ in :program:`clang-tidy`.
+
New checks
^^^^^^^^^^
>From 482b3598a8331054052e1e461127b853a0f8cc89 Mon Sep 17 00:00:00 2001
From: Baranov Victor <bar.victor.2002 at gmail.com>
Date: Mon, 10 Nov 2025 15:36:07 +0300
Subject: [PATCH 2/2] Apply suggestion
---
clang-tools-extra/docs/ReleaseNotes.rst | 7 -------
1 file changed, 7 deletions(-)
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index 145617303b8e9..20c8591f3c94b 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -62,13 +62,6 @@ Potentially Breaking Changes
From now on, users should specify explicitly that they want CSA checks to run
in :program:`clang-tidy` via `clang-analyzer-*`.
-- Renamed :program:`clang-tidy`'s option name of check
- :doc:`bugprone-easily-swappable-parameters
- <clang-tidy/checks/bugprone/easily-swappable-parameters>` from
- ``NamePrefixSuffixSilenceDissimilarityTreshold`` to
- ``NamePrefixSuffixSilenceDissimilarityThreshold``,
- correcting a spelling mistake.
-
- Renamed a few :program:`clang-tidy` check options, as they
were misspelled:
More information about the cfe-commits
mailing list