[llvm-branch-commits] [clang-tools-extra] f8b3298 - [clang-tidy] Deprecate readability-deleted-default check

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 8 20:17:02 PST 2021


Author: Nathan James
Date: 2021-03-08T20:14:58-08:00
New Revision: f8b32989241cca87a8690c8cc404f06ce1f90e4c

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

LOG: [clang-tidy] Deprecate readability-deleted-default check

... For removal in next release cycle.
The clang warning that does the same thing is enabled by default and typically emits better diagnostics making this check surplus to requirements.

Reviewed By: aaron.ballman

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

(cherry picked from commit 19aefd2d5dc3a8d3b8e81219973828170b7fcd2c)

Added: 
    

Modified: 
    clang-tools-extra/docs/ReleaseNotes.rst
    clang-tools-extra/docs/clang-tidy/checks/readability-deleted-default.rst

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index b3c9c829198b..29321bb3eb04 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -358,6 +358,16 @@ Changes in existing checks
 
   Added `std::basic_string_view` to default list of ``string``-like types.
 
+Deprecated checks
+^^^^^^^^^^^^^^^^^
+
+- The :doc:`readability-deleted-default
+  <clang-tidy/checks/readability-deleted-default>` check has been deprecated.
+  
+  The clang warning `Wdefaulted-function-deleted
+  <https://clang.llvm.org/docs/DiagnosticsReference.html#wdefaulted-function-deleted>`_
+  will diagnose the same issues and is enabled by default.
+
 Improvements to include-fixer
 -----------------------------
 

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/readability-deleted-default.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-deleted-default.rst
index 00134eb05484..5f2083e00061 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/readability-deleted-default.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/readability-deleted-default.rst
@@ -3,20 +3,6 @@
 readability-deleted-default
 ===========================
 
-Checks that constructors and assignment operators marked as ``= default`` are
-not actually deleted by the compiler.
-
-.. code-block:: c++
-
-  class Example {
-  public:
-    // This constructor is deleted because I is missing a default value.
-    Example() = default;
-    // This is fine.
-    Example(const Example& Other) = default;
-    // This operator is deleted because I cannot be assigned (it is const).
-    Example& operator=(const Example& Other) = default;
-
-  private:
-    const int I;
-  };
+This check has been deprecated prefer to make use of the `Wdefaulted-function-deleted
+<https://clang.llvm.org/docs/DiagnosticsReference.html#wdefaulted-function-deleted>`_
+flag.


        


More information about the llvm-branch-commits mailing list