https://github.com/whisperity created https://github.com/llvm/llvm-project/pull/90965
None >From 9cbd497b178a4a652f1666bca737e8ab9d2cbd00 Mon Sep 17 00:00:00 2001 From: Whisperity <whisper...@gmail.com> Date: Fri, 3 May 2024 14:47:29 +0200 Subject: [PATCH] [clang-tidy][NFC] Document CERT rule coverage and aliases for some primary checks --- .../clang-tidy/checks/bugprone/bad-signal-to-kill-thread.rst | 2 ++ .../docs/clang-tidy/checks/bugprone/macro-parentheses.rst | 4 ++++ .../checks/bugprone/suspicious-memory-comparison.rst | 2 ++ .../checks/concurrency/thread-canceltype-asynchronous.rst | 2 ++ .../checks/misc/throw-by-value-catch-by-reference.rst | 3 +-- 5 files changed, 11 insertions(+), 2 deletions(-) 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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits