diff options
Diffstat (limited to 'clang-tools-extra/docs')
4 files changed, 20 insertions, 13 deletions
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index e4a88b21de9..5a246115b8c 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -236,6 +236,12 @@ identified. The improvements since the 3.8 release include: Finds static function and variable definitions in anonymous namespace. +- New `misc-unconventional-assign-operator + <http://clang.llvm.org/extra/clang-tidy/checks/misc-unconventional-assign-operator.html>`_ check replacing old `misc-assign-operator-signature` check + + Does not only checks for correct signature but also for correct ``return`` + statements (returning ``*this``) + Fixed bugs: - Crash when running on compile database with relative source files paths. diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst index d5c680c653c..7459734afda 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -52,7 +52,7 @@ Clang-Tidy Checks llvm-twine-local misc-argument-comment misc-assert-side-effect - misc-assign-operator-signature + misc-unconventional-assign-operator misc-bool-pointer-implicit-conversion misc-dangling-handle misc-definitions-in-headers diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-assign-operator-signature.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-assign-operator-signature.rst deleted file mode 100644 index dc34e1181a1..00000000000 --- a/clang-tools-extra/docs/clang-tidy/checks/misc-assign-operator-signature.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. title:: clang-tidy - misc-assign-operator-signature - -misc-assign-operator-signature -============================== - - -Finds declarations of assign operators with the wrong return and/or argument -types. - - * The return type must be ``Class&``. - * Works with move-assign and assign by value. - * Private and deleted operators are ignored. diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-unconventional-assign-operator.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-unconventional-assign-operator.rst new file mode 100644 index 00000000000..e12241b071b --- /dev/null +++ b/clang-tools-extra/docs/clang-tidy/checks/misc-unconventional-assign-operator.rst @@ -0,0 +1,13 @@ +.. title:: clang-tidy - misc-unconventional-assign-operator + +misc-unconventional-assign-operator +==================== + + +Finds declarations of assign operators with the wrong return and/or argument +types and definitions with good return type but wrong return statements. + + * The return type must be ``Class&``. + * Works with move-assign and assign by value. + * Private and deleted operators are ignored. + * The operator must always return ``*this``. |

