[PATCH] D111041: [clang-tidy] Remove 'IgnoreDestructors = true' from cppcoreguidelines-explicit-virtual-functions

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 10 09:07:29 PDT 2021


carlosgalvezp updated this revision to Diff 378514.
carlosgalvezp edited the summary of this revision.
carlosgalvezp added a comment.

Added an extra RUN line to run the checks also for the alias, cppcoreguidelines-explicit-virtual-functions.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111041/new/

https://reviews.llvm.org/D111041

Files:
  clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/test/clang-tidy/checkers/modernize-use-override.cpp


Index: clang-tools-extra/test/clang-tidy/checkers/modernize-use-override.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/modernize-use-override.cpp
+++ clang-tools-extra/test/clang-tidy/checkers/modernize-use-override.cpp
@@ -1,4 +1,5 @@
 // RUN: %check_clang_tidy %s modernize-use-override %t -- -- -fexceptions
+// RUN: %check_clang_tidy %s cppcoreguidelines-explicit-virtual-functions %t -- -- -fexceptions
 
 #define ABSTRACT = 0
 
@@ -52,7 +53,7 @@
 struct SimpleCases : public Base {
 public:
   virtual ~SimpleCases();
-  // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override]
+  // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual'
   // CHECK-FIXES: {{^}}  ~SimpleCases() override;
 
   void a();
Index: clang-tools-extra/docs/ReleaseNotes.rst
===================================================================
--- clang-tools-extra/docs/ReleaseNotes.rst
+++ clang-tools-extra/docs/ReleaseNotes.rst
@@ -113,6 +113,10 @@
 Changes in existing checks
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+- Removed default setting `cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors = "true"`,
+  to match the current state of the C++ Core Guidelines.
+
+
 Removed checks
 ^^^^^^^^^^^^^^
 
Index: clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
===================================================================
--- clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
+++ clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
@@ -106,9 +106,6 @@
     Opts["cppcoreguidelines-non-private-member-variables-in-classes."
          "IgnoreClassesWithAllMemberVariablesBeingPublic"] = "true";
 
-    Opts["cppcoreguidelines-explicit-virtual-functions."
-         "IgnoreDestructors"] = "true";
-
     return Options;
   }
 };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111041.378514.patch
Type: text/x-patch
Size: 2008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211010/6e13bd21/attachment.bin>


More information about the cfe-commits mailing list