diff options
| author | Malcolm Parsons <malcolm.parsons@gmail.com> | 2016-12-01 17:24:42 +0000 |
|---|---|---|
| committer | Malcolm Parsons <malcolm.parsons@gmail.com> | 2016-12-01 17:24:42 +0000 |
| commit | bcf23661d08a6f77d873d2b985b34cc70c9d39e7 (patch) | |
| tree | fbef74b1ab091c916191f04bba433c1f57c23cda /clang-tools-extra/docs | |
| parent | 55082cddefbe7f4b7808bfcdfe0e7666713c99a4 (diff) | |
| download | bcm5719-llvm-bcf23661d08a6f77d873d2b985b34cc70c9d39e7.tar.gz bcm5719-llvm-bcf23661d08a6f77d873d2b985b34cc70c9d39e7.zip | |
[clang-tidy] Rename modernize-use-default to modernize-use-equals-default
Reviewers: angelgarcia, aaron.ballman, alexfh
Subscribers: JDevlieghere, Prazek, mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D26511
llvm-svn: 288375
Diffstat (limited to 'clang-tools-extra/docs')
4 files changed, 38 insertions, 25 deletions
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 3dc6ba8dda8..fb300972443 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -91,6 +91,9 @@ Improvements to clang-tidy <http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html>`_ check now warns about variable declarations that are initialized with a cast. +- The modernize-use-default check has been renamed to `modernize-use-equals-default + <http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html>`_. + - New `modernize-use-equals-delete <http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-delete.html>`_ check diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst index 08937715cb3..6cff1a2c966 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -18,7 +18,7 @@ Clang-Tidy Checks cert-err61-cpp (redirects to misc-throw-by-value-catch-by-reference) <cert-err61-cpp> cert-fio38-c (redirects to misc-non-copyable-objects) <cert-fio38-c> cert-flp30-c - cert-msc30-c (redirects to cert-limited-randomness) <cert-msc30-c> + cert-msc30-c (redirects to cert-msc50-cpp) <cert-msc30-c> cert-msc50-cpp cert-oop11-cpp (redirects to misc-move-constructor-init) <cert-oop11-cpp> cppcoreguidelines-interfaces-global-init @@ -109,8 +109,8 @@ Clang-Tidy Checks modernize-shrink-to-fit modernize-use-auto modernize-use-bool-literals - modernize-use-default modernize-use-emplace + modernize-use-equals-default modernize-use-equals-delete modernize-use-nullptr modernize-use-override diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-default.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-default.rst index ef9ddd623f8..9090e5fd077 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-default.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-default.rst @@ -1,28 +1,10 @@ +:orphan: .. title:: clang-tidy - modernize-use-default +.. meta:: + :http-equiv=refresh: 5;URL=modernize-use-equals-default.html modernize-use-default ===================== -This check replaces default bodies of special member functions with ``= -default;``. The explicitly defaulted function declarations enable more -opportunities in optimization, because the compiler might treat explicitly -defaulted functions as trivial. - -.. code-block:: c++ - - struct A { - A() {} - ~A(); - }; - A::~A() {} - - // becomes - - struct A { - A() = default; - ~A(); - }; - A::~A() = default; - -.. note:: - Move-constructor and move-assignment operator are not supported yet. +This check has been renamed to +`modernize-use-equals-default <modernize-use-equals-default.html>`_. diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-equals-default.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-equals-default.rst new file mode 100644 index 00000000000..b87f883fe1d --- /dev/null +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-equals-default.rst @@ -0,0 +1,28 @@ +.. title:: clang-tidy - modernize-use-equals-default + +modernize-use-equals-default +============================ + +This check replaces default bodies of special member functions with ``= +default;``. The explicitly defaulted function declarations enable more +opportunities in optimization, because the compiler might treat explicitly +defaulted functions as trivial. + +.. code-block:: c++ + + struct A { + A() {} + ~A(); + }; + A::~A() {} + + // becomes + + struct A { + A() = default; + ~A(); + }; + A::~A() = default; + +.. note:: + Move-constructor and move-assignment operator are not supported yet. |

