Author: Piotr Zegar
Date: 2023-07-22T15:55:22Z
New Revision: 1d0759e6c3c2eaa8cbacfd76d409ed80ffd9fe9d

URL: 
https://github.com/llvm/llvm-project/commit/1d0759e6c3c2eaa8cbacfd76d409ed80ffd9fe9d
DIFF: 
https://github.com/llvm/llvm-project/commit/1d0759e6c3c2eaa8cbacfd76d409ed80ffd9fe9d.diff

LOG: [clang-tidy][NFC] Fix list.rst generation when adding check

add_new_check.py does not work properly for checks that
generate fixes in base class. Adding some comments to those
checks in order to fix list.rst generation.

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/performance/NoexceptDestructorCheck.cpp
    clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
    clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.cpp
    clang-tools-extra/docs/clang-tidy/checks/list.rst

Removed: 
    


################################################################################
diff  --git 
a/clang-tools-extra/clang-tidy/performance/NoexceptDestructorCheck.cpp 
b/clang-tools-extra/clang-tidy/performance/NoexceptDestructorCheck.cpp
index 9f28b8ef30876b..4aa999ea5c0b7c 100644
--- a/clang-tools-extra/clang-tidy/performance/NoexceptDestructorCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/NoexceptDestructorCheck.cpp
@@ -11,6 +11,9 @@
 
 using namespace clang::ast_matchers;
 
+// FixItHint - comment added to fix list.rst generation in add_new_check.py.
+// Do not remove. Fixes are generated in base class.
+
 namespace clang::tidy::performance {
 
 void NoexceptDestructorCheck::registerMatchers(MatchFinder *Finder) {

diff  --git 
a/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp 
b/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
index 83b33d53ab5536..a77ca6aebb378e 100644
--- a/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
@@ -11,6 +11,9 @@
 
 using namespace clang::ast_matchers;
 
+// FixItHint - comment added to fix list.rst generation in add_new_check.py.
+// Do not remove. Fixes are generated in base class.
+
 namespace clang::tidy::performance {
 
 void NoexceptMoveConstructorCheck::registerMatchers(MatchFinder *Finder) {

diff  --git a/clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.cpp 
b/clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.cpp
index 67c598e0134ccf..65baebd808f6cf 100644
--- a/clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/NoexceptSwapCheck.cpp
@@ -11,6 +11,9 @@
 
 using namespace clang::ast_matchers;
 
+// FixItHint - comment added to fix list.rst generation in add_new_check.py.
+// Do not remove. Fixes are generated in base class.
+
 namespace clang::tidy::performance {
 
 void NoexceptSwapCheck::registerMatchers(MatchFinder *Finder) {

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst 
b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index d7284a3c4a145b..e13b6750196f40 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -92,7 +92,6 @@ Clang-Tidy Checks
    `bugprone-forwarding-reference-overload 
<bugprone/forwarding-reference-overload.html>`_,
    `bugprone-implicit-widening-of-multiplication-result 
<bugprone/implicit-widening-of-multiplication-result.html>`_, "Yes"
    `bugprone-inaccurate-erase <bugprone/inaccurate-erase.html>`_, "Yes"
-   `bugprone-switch-missing-default-case 
<bugprone/switch-missing-default-case.html>`_,
    `bugprone-incorrect-roundings <bugprone/incorrect-roundings.html>`_,
    `bugprone-infinite-loop <bugprone/infinite-loop.html>`_,
    `bugprone-integer-division <bugprone/integer-division.html>`_,
@@ -132,6 +131,7 @@ Clang-Tidy Checks
    `bugprone-suspicious-semicolon <bugprone/suspicious-semicolon.html>`_, "Yes"
    `bugprone-suspicious-string-compare 
<bugprone/suspicious-string-compare.html>`_, "Yes"
    `bugprone-swapped-arguments <bugprone/swapped-arguments.html>`_, "Yes"
+   `bugprone-switch-missing-default-case 
<bugprone/switch-missing-default-case.html>`_,
    `bugprone-terminating-continue <bugprone/terminating-continue.html>`_, "Yes"
    `bugprone-throw-keyword-missing <bugprone/throw-keyword-missing.html>`_,
    `bugprone-too-small-loop-variable <bugprone/too-small-loop-variable.html>`_,
@@ -490,7 +490,7 @@ Clang-Tidy Checks
    `cppcoreguidelines-noexcept-move-operations 
<cppcoreguidelines/noexcept-move-operations.html>`_, 
`performance-noexcept-move-constructor 
<performance/noexcept-move-constructor.html>`_, "Yes"
    `cppcoreguidelines-noexcept-swap <cppcoreguidelines/noexcept-swap.html>`_, 
`performance-noexcept-swap <performance/noexcept-swap.html>`_, "Yes"
    `cppcoreguidelines-non-private-member-variables-in-classes 
<cppcoreguidelines/non-private-member-variables-in-classes.html>`_, 
`misc-non-private-member-variables-in-classes 
<misc/non-private-member-variables-in-classes.html>`_,
-   `cppcoreguidelines-use-default-member-init 
<cppcoreguidelines/use-default-member-init.html>`_, 
`modernize-use-default-member-init <modernize/use-default-member-init.html>`_,
+   `cppcoreguidelines-use-default-member-init 
<cppcoreguidelines/use-default-member-init.html>`_, 
`modernize-use-default-member-init <modernize/use-default-member-init.html>`_, 
"Yes"
    `fuchsia-header-anon-namespaces <fuchsia/header-anon-namespaces.html>`_, 
`google-build-namespaces <google/build-namespaces.html>`_,
    `google-readability-braces-around-statements 
<google/readability-braces-around-statements.html>`_, 
`readability-braces-around-statements 
<readability/braces-around-statements.html>`_, "Yes"
    `google-readability-function-size 
<google/readability-function-size.html>`_, `readability-function-size 
<readability/function-size.html>`_,


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to