llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-tools-extra

Author: earnol

<details>
<summary>Changes</summary>

The change https://github.com/llvm/llvm-project/issues/183462 and subsequent 
changes removed all hicpp checkers with giving a little time to adapt. This 
change adds a generic check alias mechanism to clang-tidy that supports: 
registering aliases, central alias management table, bidirectional disable 
semantics, NOLINT suppression using alias names, canonical name preference, 
opt-in alias usage notification feature.

---

Patch is 34.70 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/197927.diff


17 Files Affected:

- (modified) clang-tools-extra/clang-tidy/CMakeLists.txt (+4-2) 
- (modified) clang-tools-extra/clang-tidy/ClangTidy.cpp (+2) 
- (modified) clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp 
(+91-4) 
- (modified) clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h (+6) 
- (modified) clang-tools-extra/clang-tidy/ClangTidyForceLinker.h (+5) 
- (modified) clang-tools-extra/clang-tidy/ClangTidyModule.cpp (+11-1) 
- (modified) clang-tools-extra/clang-tidy/ClangTidyModule.h (+19) 
- (added) clang-tools-extra/clang-tidy/aliases/CMakeLists.txt (+21) 
- (added) clang-tools-extra/clang-tidy/aliases/ClangTidyAliases.cpp (+114) 
- (added) clang-tools-extra/clang-tidy/aliases/ClangTidyAliases.h (+32) 
- (modified) clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp (-5) 
- (modified) clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp (+18) 
- (modified) clang-tools-extra/docs/ReleaseNotes.rst (+10) 
- (modified) clang-tools-extra/docs/clang-tidy/index.rst (+3) 
- (modified) clang-tools-extra/test/clang-tidy/checkers/cert/oop11-cpp.cpp 
(+1-1) 
- (added) clang-tools-extra/test/clang-tidy/checkers/check-aliasing.cpp (+41) 
- (added) clang-tools-extra/test/clang-tidy/checkers/hicpp-aliases.cpp (+120) 


``````````diff
diff --git a/clang-tools-extra/clang-tidy/CMakeLists.txt 
b/clang-tools-extra/clang-tidy/CMakeLists.txt
index 9ee9255fbe17b..19b2f2d7f74ef 100644
--- a/clang-tools-extra/clang-tidy/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/CMakeLists.txt
@@ -50,8 +50,9 @@ endif()
 
 # Checks.
 # If you add a check, also add it to ClangTidyForceLinker.h in this directory.
-add_subdirectory(android)
 add_subdirectory(abseil)
+add_subdirectory(aliases)
+add_subdirectory(android)
 add_subdirectory(altera)
 add_subdirectory(boost)
 add_subdirectory(bugprone)
@@ -77,8 +78,9 @@ add_subdirectory(portability)
 add_subdirectory(readability)
 add_subdirectory(zircon)
 set(ALL_CLANG_TIDY_CHECKS
-  clangTidyAndroidModule
   clangTidyAbseilModule
+  clangTidyAliasesModule
+  clangTidyAndroidModule
   clangTidyAlteraModule
   clangTidyBoostModule
   clangTidyBugproneModule
diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp 
b/clang-tools-extra/clang-tidy/ClangTidy.cpp
index 05c8fd02fe86a..a8468a6e333d9 100644
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
@@ -360,6 +360,7 @@ ClangTidyASTConsumerFactory::ClangTidyASTConsumerFactory(
     std::unique_ptr<ClangTidyModule> Module = E.instantiate();
     Module->addCheckFactories(*CheckFactories);
   }
+  CheckFactories->resolveAliases();
 }
 
 #if CLANG_TIDY_ENABLE_STATIC_ANALYZER
@@ -720,6 +721,7 @@ ChecksAndOptions getAllChecksAndOptions(bool 
AllowEnablingAnalyzerAlphaCheckers,
        ClangTidyModuleRegistry::entries()) {
     Module.instantiate()->addCheckFactories(Factories);
   }
+  Factories.resolveAliases();
 
   for (const auto &Factory : Factories)
     Result.Checks.insert(Factory.getKey());
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp 
b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
index 88d0a433bc7fb..0c68d1511b530 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
@@ -19,6 +19,7 @@
 #include "ClangTidyOptions.h"
 #include "GlobList.h"
 #include "NoLintDirectiveHandler.h"
+#include "aliases/ClangTidyAliases.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/ASTDiagnostic.h"
 #include "clang/AST/Attr.h"
@@ -216,8 +217,20 @@ bool ClangTidyContext::shouldSuppressDiagnostic(
     SmallVectorImpl<tooling::Diagnostic> &NoLintErrors, bool AllowIO,
     bool EnableNoLintBlocks) {
   const std::string CheckName = getCheckName(Info.getID());
-  return NoLintHandler.shouldSuppress(DiagLevel, Info, CheckName, NoLintErrors,
-                                      AllowIO, EnableNoLintBlocks);
+  if (NoLintHandler.shouldSuppress(DiagLevel, Info, CheckName, NoLintErrors,
+                                   AllowIO, EnableNoLintBlocks))
+    return true;
+  // Also check if the alias name for this check is suppressed.
+  StringRef Alias = ClangTidyAliases::getAliasForCanonical(CheckName);
+  if (!Alias.empty() &&
+      NoLintHandler.shouldSuppress(DiagLevel, Info, std::string(Alias),
+                                   NoLintErrors, AllowIO, EnableNoLintBlocks)) 
{
+    if (NotifyAliases)
+      llvm::errs() << "note: '" << Alias << "' is an alias for canonical name 
'"
+                   << CheckName << "' [checker-alias]\n";
+    return true;
+  }
+  return false;
 }
 
 void ClangTidyContext::setSourceManager(SourceManager *SourceMgr) {
@@ -236,11 +249,85 @@ static bool 
parseFileExtensions(llvm::ArrayRef<std::string> AllFileExtensions,
   return true;
 }
 
+/// Expand check alias patterns in the checks string.
+/// For each glob pattern, if it matches an alias name, also add the canonical
+/// name (and vice versa) with the same +/- prefix. This ensures that disabling
+/// either name disables both.
+static std::string expandCheckAliases(StringRef Checks) {
+  if (Checks.empty())
+    return std::string(Checks);
+
+  std::string Result;
+  llvm::raw_string_ostream OS(Result);
+  bool First = true;
+
+  StringRef Remaining = Checks;
+  while (!Remaining.empty()) {
+    // Trim leading whitespace/commas.
+    Remaining = Remaining.ltrim(" \t\n");
+    if (Remaining.empty())
+      break;
+    if (Remaining.front() == ',') {
+      Remaining = Remaining.drop_front();
+      continue;
+    }
+
+    // Extract the prefix (- or nothing).
+    bool IsNegative = Remaining.consume_front("-");
+    // Extract the glob text up to the next comma or newline.
+    StringRef Glob = Remaining.substr(0, 
Remaining.find_first_of(",\n")).trim();
+    Remaining = Remaining.substr(Glob.size());
+
+    if (Glob.empty())
+      continue;
+
+    // Write the original pattern.
+    if (!First)
+      OS << ',';
+    if (IsNegative)
+      OS << '-';
+    OS << Glob;
+    First = false;
+
+    // Check if this glob matches any alias or canonical name.
+    // Create a regex from the glob for matching.
+    SmallString<128> RegexText("^");
+    for (char C : Glob) {
+      if (C == '*')
+        RegexText.append(".*");
+      else if (StringRef("()^$|+?.[]\\{}").contains(C)) {
+        RegexText.push_back('\\');
+        RegexText.push_back(C);
+      } else {
+        RegexText.push_back(C);
+      }
+    }
+    RegexText.push_back('$');
+    llvm::Regex Re(RegexText);
+
+    for (const auto &[Alias, Canonical] : ClangTidyAliases::getReference()) {
+      if (Re.match(Alias)) {
+        // Alias enabled or disabled: also enable/disable the canonical.
+        OS << ',';
+        if (IsNegative)
+          OS << '-';
+        OS << Canonical;
+      } else if (IsNegative && Re.match(Canonical)) {
+        // Canonical disabled: also disable the alias.
+        OS << ",-";
+        OS << Alias;
+      }
+    }
+  }
+
+  return Result;
+}
+
 void ClangTidyContext::setCurrentFile(StringRef File) {
   CurrentFile = std::string(File);
   CurrentOptions = getOptionsForFile(CurrentFile);
-  CheckFilter = std::make_unique<CachedGlobList>(
-      StringRef(getOptions().Checks.value_or("")));
+  ExpandedChecks = expandCheckAliases(getOptions().Checks.value_or(""));
+  CheckFilter = std::make_unique<CachedGlobList>(StringRef(ExpandedChecks));
   WarningAsErrorFilter = std::make_unique<CachedGlobList>(
       StringRef(getOptions().WarningsAsErrors.value_or("")));
   static const std::vector<std::string> EmptyFileExtensions;
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h 
b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
index c76f58bc4cc86..6fb5120db7cca 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
@@ -150,6 +150,9 @@ class ClangTidyContext {
   /// exposed as a 'clang-diagnostic-*' check.
   bool isCompilerDiagnostic(unsigned DiagnosticID) const;
 
+  /// Enable alias usage notifications.
+  void setNotifyAliases(bool Notify) { NotifyAliases = Notify; }
+
   /// Returns \c true if the check is enabled for the \c CurrentFile.
   ///
   /// The \c CurrentFile can be changed using \c setCurrentFile.
@@ -247,9 +250,12 @@ class ClangTidyContext {
   std::string CurrentFile;
   ClangTidyOptions CurrentOptions;
 
+  std::string ExpandedChecks;
   std::unique_ptr<CachedGlobList> CheckFilter;
   std::unique_ptr<CachedGlobList> WarningAsErrorFilter;
 
+  bool NotifyAliases = false;
+
   FileExtensionsSet HeaderFileExtensions;
   FileExtensionsSet ImplementationFileExtensions;
 
diff --git a/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h 
b/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
index 2450384016e25..590f24fb61a65 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
@@ -18,6 +18,11 @@ extern volatile int AbseilModuleAnchorSource;
 [[maybe_unused]] static int AbseilModuleAnchorDestination =
     AbseilModuleAnchorSource;
 
+// This anchor is used to force the linker to link the AliasesModule.
+extern volatile int AliasesModuleAnchorSource;
+[[maybe_unused]] static int AliasesModuleAnchorDestination =
+    AliasesModuleAnchorSource;
+
 // This anchor is used to force the linker to link the AlteraModule.
 extern volatile int AlteraModuleAnchorSource;
 [[maybe_unused]] static int AlteraModuleAnchorDestination =
diff --git a/clang-tools-extra/clang-tidy/ClangTidyModule.cpp 
b/clang-tools-extra/clang-tidy/ClangTidyModule.cpp
index 976e87dffb0bf..3ac9da9dd0928 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyModule.cpp
@@ -12,9 +12,16 @@
 
 #include "ClangTidyModule.h"
 #include "ClangTidyCheck.h"
+#include "aliases/ClangTidyAliases.h"
 
 namespace clang::tidy {
 
+/// Returns true if CheckName is an alias whose canonical check is also 
enabled.
+static bool isRedundantAlias(StringRef CheckName, ClangTidyContext *Context) {
+  StringRef Canonical = ClangTidyAliases::getCanonicalForAlias(CheckName);
+  return !Canonical.empty() && Context->isCheckEnabled(Canonical);
+}
+
 void ClangTidyCheckFactories::registerCheckFactory(StringRef Name,
                                                    CheckFactory Factory) {
   Factories.insert_or_assign(Name, std::move(Factory));
@@ -24,7 +31,8 @@ std::vector<std::unique_ptr<ClangTidyCheck>>
 ClangTidyCheckFactories::createChecks(ClangTidyContext *Context) const {
   std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
   for (const auto &[CheckName, Factory] : Factories)
-    if (Context->isCheckEnabled(CheckName))
+    if (Context->isCheckEnabled(CheckName) &&
+        !isRedundantAlias(CheckName, Context))
       Checks.emplace_back(Factory(CheckName, Context));
   return Checks;
 }
@@ -37,6 +45,8 @@ ClangTidyCheckFactories::createChecksForLanguage(
   for (const auto &[CheckName, Factory] : Factories) {
     if (!Context->isCheckEnabled(CheckName))
       continue;
+    if (isRedundantAlias(CheckName, Context))
+      continue;
     std::unique_ptr<ClangTidyCheck> Check = Factory(CheckName, Context);
     if (Check->isLanguageVersionSupported(LO))
       Checks.push_back(std::move(Check));
diff --git a/clang-tools-extra/clang-tidy/ClangTidyModule.h 
b/clang-tools-extra/clang-tidy/ClangTidyModule.h
index 3db92c2dab981..dfbeb5e3d85aa 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyModule.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyModule.h
@@ -10,6 +10,7 @@
 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H
 
 #include "ClangTidyOptions.h"
+#include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Registry.h"
@@ -65,6 +66,23 @@ class ClangTidyCheckFactories {
 
   void eraseCheck(StringRef CheckName) { Factories.erase(CheckName); }
 
+  /// Registers \p AliasName as an alias for check \p CanonicalName.
+  /// The alias is resolved after all modules have registered their checks.
+  void registerCheckAlias(StringRef AliasName, StringRef CanonicalName) {
+    PendingAliases.emplace_back(AliasName, CanonicalName);
+  }
+
+  /// Resolves all pending aliases. Must be called after all modules have
+  /// registered their check factories.
+  void resolveAliases() {
+    for (const auto &[Alias, Canonical] : PendingAliases) {
+      auto It = Factories.find(Canonical);
+      if (It != Factories.end())
+        Factories[Alias] = It->second;
+    }
+    PendingAliases.clear();
+  }
+
   /// Create instances of checks that are enabled.
   std::vector<std::unique_ptr<ClangTidyCheck>>
   createChecks(ClangTidyContext *Context) const;
@@ -80,6 +98,7 @@ class ClangTidyCheckFactories {
 
 private:
   FactoryMap Factories;
+  SmallVector<std::pair<std::string, std::string>> PendingAliases;
 };
 
 /// A clang-tidy module groups a number of \c ClangTidyChecks and gives
diff --git a/clang-tools-extra/clang-tidy/aliases/CMakeLists.txt 
b/clang-tools-extra/clang-tidy/aliases/CMakeLists.txt
new file mode 100644
index 0000000000000..4e39b71827121
--- /dev/null
+++ b/clang-tools-extra/clang-tidy/aliases/CMakeLists.txt
@@ -0,0 +1,21 @@
+set(LLVM_LINK_COMPONENTS
+  support
+  FrontendOpenMP
+  )
+
+add_clang_library(clangTidyAliasesModule STATIC
+  ClangTidyAliases.cpp
+
+  LINK_LIBS
+  clangTidy
+  clangTidyUtils
+
+  DEPENDS
+  omp_gen
+  ClangDriverOptions
+  )
+
+clang_target_link_libraries(clangTidyAliasesModule
+  PRIVATE
+  clangBasic
+  )
diff --git a/clang-tools-extra/clang-tidy/aliases/ClangTidyAliases.cpp 
b/clang-tools-extra/clang-tidy/aliases/ClangTidyAliases.cpp
new file mode 100644
index 0000000000000..2cc0fadc1b617
--- /dev/null
+++ b/clang-tools-extra/clang-tidy/aliases/ClangTidyAliases.cpp
@@ -0,0 +1,114 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "ClangTidyAliases.h"
+#include "../ClangTidyModule.h"
+#include "llvm/ADT/StringMap.h"
+#include <cassert>
+
+namespace clang::tidy {
+
+/// Alias table. Kept sorted by alias name for readability.
+static constexpr std::pair<StringRef, StringRef> AliasTable[] = {
+    // Permanent aliases.
+    {"cert-dcl03-c", "misc-static-assert"},
+    {"cert-oop11-cpp", "performance-move-constructor-init"},
+    // Deprecated aliases: keeping for backward compatibility.
+    {"hicpp-avoid-c-arrays", "modernize-avoid-c-arrays"},
+    {"hicpp-avoid-goto", "cppcoreguidelines-avoid-goto"},
+    {"hicpp-braces-around-statements", "readability-braces-around-statements"},
+    {"hicpp-deprecated-headers", "modernize-deprecated-headers"},
+    {"hicpp-exception-baseclass", "bugprone-std-exception-baseclass"},
+    {"hicpp-explicit-conversions", "misc-explicit-constructor"},
+    {"hicpp-function-size", "readability-function-size"},
+    {"hicpp-ignored-remove-result", "bugprone-unused-return-value"},
+    {"hicpp-invalid-access-moved", "bugprone-use-after-move"},
+    {"hicpp-member-init", "cppcoreguidelines-pro-type-member-init"},
+    {"hicpp-move-const-arg", "performance-move-const-arg"},
+    {"hicpp-multiway-paths-covered", "bugprone-unhandled-code-paths"},
+    {"hicpp-named-parameter", "readability-named-parameter"},
+    {"hicpp-new-delete-operators", "misc-new-delete-overloads"},
+    {"hicpp-no-array-decay",
+     "cppcoreguidelines-pro-bounds-array-to-pointer-decay"},
+    {"hicpp-no-assembler", "portability-no-assembler"},
+    {"hicpp-no-malloc", "cppcoreguidelines-no-malloc"},
+    {"hicpp-noexcept-move", "performance-noexcept-move-constructor"},
+    {"hicpp-signed-bitwise", "bugprone-signed-bitwise"},
+    {"hicpp-special-member-functions",
+     "cppcoreguidelines-special-member-functions"},
+    {"hicpp-static-assert", "misc-static-assert"},
+    {"hicpp-undelegated-constructor", "bugprone-undelegated-constructor"},
+    {"hicpp-uppercase-literal-suffix", "readability-uppercase-literal-suffix"},
+    {"hicpp-use-auto", "modernize-use-auto"},
+    {"hicpp-use-emplace", "modernize-use-emplace"},
+    {"hicpp-use-equals-default", "modernize-use-equals-default"},
+    {"hicpp-use-equals-delete", "modernize-use-equals-delete"},
+    {"hicpp-use-noexcept", "modernize-use-noexcept"},
+    {"hicpp-use-nullptr", "modernize-use-nullptr"},
+    {"hicpp-use-override", "modernize-use-override"},
+    {"hicpp-vararg", "cppcoreguidelines-pro-type-vararg"},
+};
+
+ArrayRef<std::pair<StringRef, StringRef>> ClangTidyAliases::getReference() {
+  return AliasTable;
+}
+
+StringRef ClangTidyAliases::getCanonicalForAlias(StringRef Alias) {
+  static const auto *Map = [] {
+    auto *M = new llvm::StringMap<StringRef>();
+    for (const auto &[A, Canonical] : AliasTable) {
+      auto Result = M->try_emplace(A, Canonical);
+      assert(Result.second && "Duplicate alias in ClangTidyAliases table");
+    }
+    return M;
+  }();
+  auto It = Map->find(Alias);
+  if (It != Map->end())
+    return It->second;
+  return {};
+}
+
+StringRef ClangTidyAliases::getAliasForCanonical(StringRef Canonical) {
+  static const auto *ReverseMap = [] {
+    auto *M = new llvm::StringMap<StringRef>();
+    for (const auto &[Alias, Canon] : AliasTable) {
+      auto Result = M->try_emplace(Canon, Alias);
+      assert(Result.second &&
+             "Duplicate canonical name in ClangTidyAliases table");
+    }
+    return M;
+  }();
+  auto It = ReverseMap->find(Canonical);
+  if (It != ReverseMap->end())
+    return It->second;
+  return {};
+}
+
+namespace aliases {
+namespace {
+
+class AliasesModule : public ClangTidyModule {
+public:
+  void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
+    for (const auto &[Alias, Canonical] : AliasTable)
+      CheckFactories.registerCheckAlias(Alias, Canonical);
+  }
+};
+
+} // namespace
+
+static ClangTidyModuleRegistry::Add<AliasesModule>
+    X("aliases-module", "Adds check aliases for backward compatibility.");
+
+} // namespace aliases
+
+// This anchor is used to force the linker to link in the generated object file
+// and thus register the AliasesModule.
+volatile int AliasesModuleAnchorSource = 0;
+
+} // namespace clang::tidy
diff --git a/clang-tools-extra/clang-tidy/aliases/ClangTidyAliases.h 
b/clang-tools-extra/clang-tidy/aliases/ClangTidyAliases.h
new file mode 100644
index 0000000000000..d110c806fabe1
--- /dev/null
+++ b/clang-tools-extra/clang-tidy/aliases/ClangTidyAliases.h
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYALIASES_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYALIASES_H
+
+#include "clang/Basic/LLVM.h"
+#include "llvm/ADT/ArrayRef.h"
+#include <utility>
+
+namespace clang::tidy {
+
+class ClangTidyAliases {
+public:
+  /// Look up the canonical name for an alias.
+  static StringRef getCanonicalForAlias(StringRef Alias);
+
+  /// Look up the alias for a canonical name.
+  static StringRef getAliasForCanonical(StringRef Canonical);
+
+  /// Get a reference to the full alias table for iteration.
+  static ArrayRef<std::pair<StringRef, StringRef>> getReference();
+};
+
+} // namespace clang::tidy
+
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYALIASES_H
diff --git a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp 
b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
index ee1ce59d80b0d..3a56f5b1f9393 100644
--- a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
@@ -35,11 +35,9 @@
 #include "../misc/NewDeleteOverloadsCheck.h"
 #include "../misc/NonCopyableObjectsCheck.h"
 #include "../misc/PredictableRandCheck.h"
-#include "../misc/StaticAssertCheck.h"
 #include "../misc/ThrowByValueCatchByReferenceCheck.h"
 #include "../modernize/AvoidSetjmpLongjmpCheck.h"
 #include "../modernize/AvoidVariadicFunctionsCheck.h"
-#include "../performance/MoveConstructorInitCheck.h"
 #include "../readability/EnumInitialValueCheck.h"
 #include "../readability/UppercaseLiteralSuffixCheck.h"
 
@@ -275,8 +273,6 @@ class CERTModule : public ClangTidyModule {
     CheckFactories.registerCheck<bugprone::SignalHandlerCheck>(
         "cert-msc54-cpp");
     // OOP
-    CheckFactories.registerCheck<performance::MoveConstructorInitCheck>(
-        "cert-oop11-cpp");
     CheckFactories.registerCheck<bugprone::UnhandledSelfAssignmentCheck>(
         "cert-oop54-cpp");
     CheckFactories.registerCheck<bugprone::RawMemoryCallOnNonTrivialTypeCheck>(
@@ -292,7 +288,6 @@ class CERTModule : public ClangTidyModule {
     CheckFactories.registerCheck<bugprone::SpuriouslyWakeUpFunctionsCheck>(
         "cert-con36-c");
     // DCL
-    CheckFactories.registerCheck<misc::StaticAssertCheck>("cert-dcl03-c");
     CheckFactories.registerCheck<readability::UppercaseLiteralSuffixCheck>(
         "cert-dcl16-c");
     CheckFactories.registerCheck<bugprone::ReservedIdentifierCheck>(
diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp 
b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
index 949a88f0fd50d..ba7b77aca6eac 100644
--- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.c...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/197927
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to