[clang-tools-extra] 3cf574d - [clang-tidy][NFC] Document CERT rule coverage and aliases for some primary checks (#90965)

via cfe-commits cfe-commits at lists.llvm.org
Fri May 3 12:40:40 PDT 2024


Author: whisperity
Date: 2024-05-03T21:40:36+02:00
New Revision: 3cf574da407b9be01cc86f0ad2902c5d2ff8f078

URL: https://github.com/llvm/llvm-project/commit/3cf574da407b9be01cc86f0ad2902c5d2ff8f078
DIFF: https://github.com/llvm/llvm-project/commit/3cf574da407b9be01cc86f0ad2902c5d2ff8f078.diff

LOG: [clang-tidy][NFC] Document CERT rule coverage and aliases for some primary checks (#90965)

Added: 
    

Modified: 
    clang-tools-extra/docs/clang-tidy/checks/bugprone/bad-signal-to-kill-thread.rst
    clang-tools-extra/docs/clang-tidy/checks/bugprone/macro-parentheses.rst
    clang-tools-extra/docs/clang-tidy/checks/bugprone/suspicious-memory-comparison.rst
    clang-tools-extra/docs/clang-tidy/checks/concurrency/thread-canceltype-asynchronous.rst
    clang-tools-extra/docs/clang-tidy/checks/misc/throw-by-value-catch-by-reference.rst

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/bad-signal-to-kill-thread.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/bad-signal-to-kill-thread.rst
index 24b08da6c5c30b..365624a8b1a0ad 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/bad-signal-to-kill-thread.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/bad-signal-to-kill-thread.rst
@@ -14,3 +14,5 @@ just the individual thread. Use any signal except ``SIGTERM``.
 This check corresponds to the CERT C Coding Standard rule
 `POS44-C. Do not use signals to terminate threads
 <https://wiki.sei.cmu.edu/confluence/display/c/POS44-C.+Do+not+use+signals+to+terminate+threads>`_.
+
+`cert-pos44-c` redirects here as an alias of this check.

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/macro-parentheses.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/macro-parentheses.rst
index b6bafcec1644f7..80cea089564e4b 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/macro-parentheses.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/macro-parentheses.rst
@@ -17,3 +17,7 @@ completely before it is used.
 It is also recommended to surround macro arguments in the replacement list
 with parentheses. This ensures that the argument value is calculated
 properly.
+
+This check corresponds to the CERT C Coding Standard rule
+`PRE20-C. Macro replacement lists should be parenthesized.
+<https://wiki.sei.cmu.edu/confluence/display/c/PRE02-C.+Macro+replacement+lists+should+be+parenthesized>`_

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/suspicious-memory-comparison.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/suspicious-memory-comparison.rst
index 549e214b241b11..f82863f7c2f18f 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/suspicious-memory-comparison.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/suspicious-memory-comparison.rst
@@ -29,3 +29,5 @@ This check is also related to and partially overlaps the CERT C++ Coding Standar
 and
 `EXP62-CPP. Do not access the bits of an object representation that are not part of the object's value representation
 <https://wiki.sei.cmu.edu/confluence/display/cplusplus/EXP62-CPP.+Do+not+access+the+bits+of+an+object+representation+that+are+not+part+of+the+object%27s+value+representation>`_
+
+`cert-exp42-c` redirects here as an alias of this check.

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/concurrency/thread-canceltype-asynchronous.rst b/clang-tools-extra/docs/clang-tidy/checks/concurrency/thread-canceltype-asynchronous.rst
index 11edd001365d14..5e4d980077d507 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/concurrency/thread-canceltype-asynchronous.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/concurrency/thread-canceltype-asynchronous.rst
@@ -17,3 +17,5 @@ be acted upon and the effect is as if it was an asynchronous cancellation.
 This check corresponds to the CERT C Coding Standard rule
 `POS47-C. Do not use threads that can be canceled asynchronously
 <https://wiki.sei.cmu.edu/confluence/display/c/POS47-C.+Do+not+use+threads+that+can+be+canceled+asynchronously>`_.
+
+`cert-pos47-c` redirects here as an alias of this check.

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/misc/throw-by-value-catch-by-reference.rst b/clang-tools-extra/docs/clang-tidy/checks/misc/throw-by-value-catch-by-reference.rst
index af6ec1416e5e27..b89fbe8b44665e 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/misc/throw-by-value-catch-by-reference.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/misc/throw-by-value-catch-by-reference.rst
@@ -3,8 +3,7 @@
 misc-throw-by-value-catch-by-reference
 ======================================
 
-`cert-err09-cpp` redirects here as an alias for this check.
-`cert-err61-cpp` redirects here as an alias for this check.
+`cert-err09-cpp` and `cert-err61-cpp` redirect here as aliases of this check.
 
 Finds violations of the rule "Throw by value, catch by reference" presented for
 example in "C++ Coding Standards" by H. Sutter and A. Alexandrescu, as well as


        


More information about the cfe-commits mailing list