[clang-tools-extra] b3700c3 - [clang-tidy] Re-add cppcoreguidelines-macro-to-enum alias

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 6 01:12:09 PDT 2023


Author: Piotr Zegar
Date: 2023-08-06T08:09:57Z
New Revision: b3700c34aa712fb4034fb2c31b0767993b1a6b7f

URL: https://github.com/llvm/llvm-project/commit/b3700c34aa712fb4034fb2c31b0767993b1a6b7f
DIFF: https://github.com/llvm/llvm-project/commit/b3700c34aa712fb4034fb2c31b0767993b1a6b7f.diff

LOG: [clang-tidy] Re-add cppcoreguidelines-macro-to-enum alias

Looks like somewere in clang-16 this alias were removed,
even that is mention in clang-tidy 15 release notes.

Fixes: #64342

Reviewed By: carlosgalvezp

Differential Revision: https://reviews.llvm.org/D157181

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
    clang-tools-extra/docs/ReleaseNotes.rst

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
index a535e7d0c14fba..fdbf0e11f3f5f8 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
@@ -12,6 +12,7 @@
 #include "../misc/NonPrivateMemberVariablesInClassesCheck.h"
 #include "../misc/UnconventionalAssignOperatorCheck.h"
 #include "../modernize/AvoidCArraysCheck.h"
+#include "../modernize/MacroToEnumCheck.h"
 #include "../modernize/UseDefaultMemberInitCheck.h"
 #include "../modernize/UseOverrideCheck.h"
 #include "../performance/NoexceptDestructorCheck.h"
@@ -77,6 +78,8 @@ class CppCoreGuidelinesModule : public ClangTidyModule {
         "cppcoreguidelines-init-variables");
     CheckFactories.registerCheck<InterfacesGlobalInitCheck>(
         "cppcoreguidelines-interfaces-global-init");
+    CheckFactories.registerCheck<modernize::MacroToEnumCheck>(
+        "cppcoreguidelines-macro-to-enum");
     CheckFactories.registerCheck<MacroUsageCheck>(
         "cppcoreguidelines-macro-usage");
     CheckFactories.registerCheck<MisleadingCaptureDefaultByValueCheck>(

diff  --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index ba79e8df786135..1bebc55eec7d08 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -156,6 +156,10 @@ New checks
 New check aliases
 ^^^^^^^^^^^^^^^^^
 
+- New alias :doc:`cppcoreguidelines-macro-to-enum
+  <clang-tidy/checks/cppcoreguidelines/macro-to-enum>` to :doc:`modernize-macro-to-enum
+  <clang-tidy/checks/modernize/macro-to-enum>` was added.
+
 Changes in existing checks
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 


        


More information about the cfe-commits mailing list