diff options
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy')
3 files changed, 35 insertions, 25 deletions
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. |

