From dc0f79ea5b99b9609a21c29089c294ab82d88094 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 13 Apr 2020 22:33:11 +0200 Subject: [PATCH] clang-tidy doc: add a note for checkers with an autofix Summary: Currently, when looking at a checker documentation, we have to go back to the whole list or look at the sources to figure out if an autofix is available or not. Reviewers: alexfh, aaron.ballman Subscribers: wuzish, Eugene.Zelenko, nemanjai, kbarton, arphaman, Charusso, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77983 --- .../docs/clang-tidy/checks/misc-unused-parameters.rst | 5 +++++ .../docs/clang-tidy/checks/modernize-avoid-bind.rst | 5 +++++ .../checks/modernize-deprecated-ios-base-aliases.rst | 5 +++++ .../docs/clang-tidy/checks/modernize-loop-convert.rst | 5 +++++ .../docs/clang-tidy/checks/modernize-make-shared.rst | 5 +++++ .../docs/clang-tidy/checks/modernize-use-bool-literals.rst | 5 +++++ 6 files changed, 30 insertions(+) diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-unused-parameters.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-unused-parameters.rst index 3dfeb299de06..de520e9511c7 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/misc-unused-parameters.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/misc-unused-parameters.rst @@ -40,3 +40,8 @@ Options constructors - no constructor initializers). When the function body is empty, an unused parameter is unlikely to be unnoticed by a human reader, and there's basically no place for a bug to hide. + +Automatic Fixes +^^^^^^^^^^^^^^^ + +The check provides suggested fixes. See the documentation above for the details. diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-avoid-bind.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-avoid-bind.rst index 82c290e4a21b..35be77d11c08 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-avoid-bind.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-avoid-bind.rst @@ -86,3 +86,8 @@ that accepts 2 arguments. With permissive parameter list, it instead generates which is correct. This check requires using C++14 or higher to run. + +Automatic Fixes +^^^^^^^^^^^^^^^ + +The check provides suggested fixes. See the documentation above for the details. diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-ios-base-aliases.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-ios-base-aliases.rst index f217ff090445..a36d58e4e31d 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-ios-base-aliases.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-ios-base-aliases.rst @@ -15,3 +15,8 @@ Deprecated member type Replacement ``std::ios_base::streamoff`` ``std::ios_base::streampos`` =================================== =========================== + +Automatic Fixes +^^^^^^^^^^^^^^^ + +The check provides suggested fixes. See the documentation above for the details. diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-loop-convert.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-loop-convert.rst index 82b27bbe9020..89d4a0c95a01 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-loop-convert.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-loop-convert.rst @@ -265,3 +265,8 @@ exclude incorrect diagnostics on OpenMP for loops prior to OpenMP 5. To prevent this check to be applied (and to break) OpenMP for loops but still be applied to non-OpenMP for loops the usage of ``NOLINT`` (see :ref:`clang-tidy-nolint`) on the specific for loops is recommended. + +Automatic Fixes +^^^^^^^^^^^^^^^ + +The check provides suggested fixes. See the documentation above for the details. diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-make-shared.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-make-shared.rst index e73b32034f3d..f81ac2c9cbb9 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-make-shared.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-make-shared.rst @@ -48,3 +48,8 @@ Options If set to non-zero, the check will not give warnings inside macros. Default is `1`. + +Automatic Fixes +^^^^^^^^^^^^^^^ + +The check provides suggested fixes. See the documentation above for the details. diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-bool-literals.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-bool-literals.rst index 792d3a4c3dc4..09556800ed86 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-bool-literals.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-bool-literals.rst @@ -26,3 +26,8 @@ Options If set to non-zero, the check will not give warnings inside macros. Default is `1`. + +Automatic Fixes +^^^^^^^^^^^^^^^ + +The check provides suggested fixes. See the documentation above for the details.