Skip to content

Commit f8b3298

Browse files
njames93tstellar
authored andcommitted
[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 19aefd2)
1 parent 46a1b06 commit f8b3298

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,16 @@ Changes in existing checks
358358

359359
Added `std::basic_string_view` to default list of ``string``-like types.
360360

361+
Deprecated checks
362+
^^^^^^^^^^^^^^^^^
363+
364+
- The :doc:`readability-deleted-default
365+
<clang-tidy/checks/readability-deleted-default>` check has been deprecated.
366+
367+
The clang warning `Wdefaulted-function-deleted
368+
<https://clang.llvm.org/docs/DiagnosticsReference.html#wdefaulted-function-deleted>`_
369+
will diagnose the same issues and is enabled by default.
370+
361371
Improvements to include-fixer
362372
-----------------------------
363373

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

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,6 @@
33
readability-deleted-default
44
===========================
55

6-
Checks that constructors and assignment operators marked as ``= default`` are
7-
not actually deleted by the compiler.
8-
9-
.. code-block:: c++
10-
11-
class Example {
12-
public:
13-
// This constructor is deleted because I is missing a default value.
14-
Example() = default;
15-
// This is fine.
16-
Example(const Example& Other) = default;
17-
// This operator is deleted because I cannot be assigned (it is const).
18-
Example& operator=(const Example& Other) = default;
19-
20-
private:
21-
const int I;
22-
};
6+
This check has been deprecated prefer to make use of the `Wdefaulted-function-deleted
7+
<https://clang.llvm.org/docs/DiagnosticsReference.html#wdefaulted-function-deleted>`_
8+
flag.

0 commit comments

Comments
 (0)