Author: mitchell Date: 2025-11-16T12:03:53+03:00 New Revision: c73870dbe89a8219130e21a0b3f13df76d299352
URL: https://github.com/llvm/llvm-project/commit/c73870dbe89a8219130e21a0b3f13df76d299352 DIFF: https://github.com/llvm/llvm-project/commit/c73870dbe89a8219130e21a0b3f13df76d299352.diff LOG: [clang-tidy][docs][NFC] Enforce 80 characters limit (2/N) (#167632) Fix documentation in `cert`, `clang-analyzer`, `concurrency`, `cppcoreguidelines`, `darwin`, `fuchsia` and `google`. This is part of the codebase cleanup described in [#167098](https://github.com/llvm/llvm-project/issues/167098) Added: Modified: clang-tools-extra/docs/clang-tidy/checks/cert/con36-c.rst clang-tools-extra/docs/clang-tidy/checks/cert/con54-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/ctr56-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/dcl16-c.rst clang-tools-extra/docs/clang-tidy/checks/cert/dcl50-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/dcl58-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/dcl59-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/env33-c.rst clang-tools-extra/docs/clang-tidy/checks/cert/err09-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst clang-tools-extra/docs/clang-tidy/checks/cert/err34-c.rst clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/err58-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/err60-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/err61-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/exp42-c.rst clang-tools-extra/docs/clang-tidy/checks/cert/flp30-c.rst clang-tools-extra/docs/clang-tidy/checks/cert/flp37-c.rst clang-tools-extra/docs/clang-tidy/checks/cert/mem57-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/msc50-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/oop54-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/oop57-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/oop58-cpp.rst clang-tools-extra/docs/clang-tidy/checks/cert/pos44-c.rst clang-tools-extra/docs/clang-tidy/checks/cert/pos47-c.rst clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.SetgidSetuidOrder.rst clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.insecureAPI.decodeValueOfObjCType.rst clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/unix.StdCLibraryFunctions.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-c-arrays.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-capturing-lambda-coroutines.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-do-while.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-magic-numbers.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-reference-coroutine-parameters.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/c-copy-assignment-signature.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/explicit-virtual-functions.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/macro-to-enum.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/narrowing-conversions.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/noexcept-move-operations.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/non-private-member-variables-in-classes.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/prefer-member-initializer.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-avoid-unchecked-container-access.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-const-cast.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-cstyle-cast.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-vararg.rst clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst clang-tools-extra/docs/clang-tidy/checks/google/explicit-constructor.rst clang-tools-extra/docs/clang-tidy/checks/google/objc-avoid-throwing-exception.rst clang-tools-extra/docs/clang-tidy/checks/google/objc-global-variable-declaration.rst clang-tools-extra/docs/clang-tidy/checks/google/readability-avoid-underscore-in-googletest-name.rst clang-tools-extra/docs/clang-tidy/checks/google/readability-braces-around-statements.rst clang-tools-extra/docs/clang-tidy/checks/google/upgrade-googletest-case.rst clang-tools-extra/docs/clang-tidy/checks/list.rst Removed: ################################################################################ diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/con36-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/con36-c.rst index 2a1d5173dd756..95f70d8d4f514 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/con36-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/con36-c.rst @@ -6,5 +6,6 @@ cert-con36-c ============ The `cert-con36-c` check is an alias, please see -:doc:`bugprone-spuriously-wake-up-functions <../bugprone/spuriously-wake-up-functions>` +:doc:`bugprone-spuriously-wake-up-functions +<../bugprone/spuriously-wake-up-functions>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/con54-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/con54-cpp.rst index 3b4039d7d4ec0..c8cc8bd613a87 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/con54-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/con54-cpp.rst @@ -6,5 +6,6 @@ cert-con54-cpp ============== The `cert-con54-cpp` check is an alias, please see -:doc:`bugprone-spuriously-wake-up-functions <../bugprone/spuriously-wake-up-functions>` +:doc:`bugprone-spuriously-wake-up-functions +<../bugprone/spuriously-wake-up-functions>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/ctr56-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/ctr56-cpp.rst index e42acbe552359..78afc2f7ab8d5 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/ctr56-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/ctr56-cpp.rst @@ -7,4 +7,4 @@ cert-ctr56-cpp The `cert-ctr56-cpp` check is an alias, please see :doc:`bugprone-pointer-arithmetic-on-polymorphic-object -<../bugprone/pointer-arithmetic-on-polymorphic-object>` for more information. \ No newline at end of file +<../bugprone/pointer-arithmetic-on-polymorphic-object>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/dcl16-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/dcl16-c.rst index 7a5b63db1782c..977a0a58eac0d 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/dcl16-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/dcl16-c.rst @@ -6,4 +6,5 @@ cert-dcl16-c ============ The `cert-dcl16-c` check is an alias, please see -:doc:`readability-uppercase-literal-suffix <../readability/uppercase-literal-suffix>` for more information. +:doc:`readability-uppercase-literal-suffix +<../readability/uppercase-literal-suffix>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/dcl50-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/dcl50-cpp.rst index 719e03d6918d1..dd4bd30ab08b8 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/dcl50-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/dcl50-cpp.rst @@ -6,7 +6,8 @@ cert-dcl50-cpp ============== The `cert-dcl50-cpp` check is an alias, please see -`modernize-avoid-variadic-functions <../modernize/avoid-variadic-functions.html>`_ +:doc:`modernize-avoid-variadic-functions +<../modernize/avoid-variadic-functions>` for more information. This check corresponds to the CERT C++ Coding Standard rule diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/dcl58-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/dcl58-cpp.rst index 1b8c2c4f97dde..04192fc31149c 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/dcl58-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/dcl58-cpp.rst @@ -4,7 +4,8 @@ cert-dcl58-cpp ============== The `cert-dcl58-cpp` is an aliaes, please see -`bugprone-std-namespace-modification <../bugprone/std-namespace-modification.html>`_ +:doc:`bugprone-std-namespace-modification +<../bugprone/std-namespace-modification>` for more information. This check corresponds to the CERT C++ Coding Standard rule diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/dcl59-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/dcl59-cpp.rst index 9aeed141d655d..027d2eca09195 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/dcl59-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/dcl59-cpp.rst @@ -6,4 +6,5 @@ cert-dcl59-cpp ============== The `cert-dcl59-cpp` check is an alias, please see -:doc:`google-build-namespaces <../google/build-namespaces>` for more information. +:doc:`google-build-namespaces <../google/build-namespaces>` +for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/env33-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/env33-c.rst index 751bccfaee8f2..33fa7f1c3dd57 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/env33-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/env33-c.rst @@ -4,7 +4,7 @@ cert-env33-c ============ The `cert-env33-c` check is an alias, please see -`bugprone-command-processor <../bugprone/command-processor.html>`_ +:doc:`bugprone-command-processor <../bugprone/command-processor>` for more information. This check corresponds to the CERT C Coding Standard rule diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err09-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err09-cpp.rst index 1a9c0f9d7cbed..65d3a60f53d71 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/err09-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err09-cpp.rst @@ -6,10 +6,12 @@ cert-err09-cpp ============== The `cert-err09-cpp` check is an alias, please see -:doc:`misc-throw-by-value-catch-by-reference <../misc/throw-by-value-catch-by-reference>` +:doc:`misc-throw-by-value-catch-by-reference +<../misc/throw-by-value-catch-by-reference>` for more information. This check corresponds to the CERT C++ Coding Standard recommendation -ERR09-CPP. Throw anonymous temporaries. However, all of the CERT recommendations -have been removed from public view, and so their justification for the behavior -of this check requires an account on their wiki to view. +ERR09-CPP. Throw anonymous temporaries. However, all of the CERT +recommendations have been removed from public view, and so their +justification for the behavior of this check requires an account on +their wiki to view. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst index 9bcc5f9c3823c..75da669c0a2b3 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst @@ -186,8 +186,8 @@ functions are checked: * wscanf() * wscanf_s() -This check is an alias of check :doc:`bugprone-unused-return-value <../bugprone/unused-return-value>` -with a fixed set of functions. +This check is an alias of check :doc:`bugprone-unused-return-value +<../bugprone/unused-return-value>` with a fixed set of functions. Suppressing issues by casting to ``void`` is enabled by default and can be disabled by setting `AllowCastToVoid` option to `false`. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err34-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err34-c.rst index dc3f6329dfb67..5f0dc80648bbf 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/err34-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err34-c.rst @@ -6,5 +6,6 @@ cert-err34-c ============ The cert-err34-c check is an alias, please see -`bugprone-unchecked-string-to-number-conversion <../bugprone/unchecked-string-to-number-conversion.html>`_ +:doc:`bugprone-unchecked-string-to-number-conversion +<../bugprone/unchecked-string-to-number-conversion>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst index 144d209b356d7..4b726d8115662 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err52-cpp.rst @@ -4,7 +4,7 @@ cert-err52-cpp ============== The `cert-err52-cpp` check is an alias, please see -`modernize-avoid-setjmp-longjmp <../modernize/avoid-setjmp-longjmp.html>`_ +:doc:`modernize-avoid-setjmp-longjmp <../modernize/avoid-setjmp-longjmp>` for more information. This check corresponds to the CERT C++ Coding Standard rule diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err58-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err58-cpp.rst index 4db0727864cef..c5e2850c6dee6 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/err58-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err58-cpp.rst @@ -6,7 +6,8 @@ cert-err58-cpp ============== The `cert-err58-cpp` check is an alias, please see -`bugprone-throwing-static-initialization <../bugprone/throwing-static-initialization.html>`_ +:doc:`bugprone-throwing-static-initialization +<../bugprone/throwing-static-initialization>` for more information. This check corresponds to the CERT C++ Coding Standard rule diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err60-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err60-cpp.rst index 8d6dd1bf4b9b7..f5ed313acbcbe 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/err60-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err60-cpp.rst @@ -6,7 +6,8 @@ cert-err60-cpp ============== The `cert-err60-cpp` check is an alias, please see -`bugprone-exception-copy-constructor-throws <../bugprone/exception-copy-constructor-throws.html>`_ +:doc:`bugprone-exception-copy-constructor-throws +<../bugprone/exception-copy-constructor-throws>` for more information. This check corresponds to the CERT C++ Coding Standard rule diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err61-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err61-cpp.rst index 96007952c0e2a..2cf78132d11ee 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/err61-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err61-cpp.rst @@ -6,5 +6,6 @@ cert-err61-cpp ============== The `cert-err61-cpp` check is an alias, please see -:doc:`misc-throw-by-value-catch-by-reference <../misc/throw-by-value-catch-by-reference>` +:doc:`misc-throw-by-value-catch-by-reference +<../misc/throw-by-value-catch-by-reference>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/exp42-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/exp42-c.rst index 03a3679dba4e2..69f9c7a34d2f9 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/exp42-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/exp42-c.rst @@ -5,4 +5,5 @@ cert-exp42-c ============ The `cert-exp42-c` check is an alias, please see -:doc:`bugprone-suspicious-memory-comparison <../bugprone/suspicious-memory-comparison>` for more information. +:doc:`bugprone-suspicious-memory-comparison +<../bugprone/suspicious-memory-comparison>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/flp30-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/flp30-c.rst index 5f6eff447cc2f..8bd23f6cdd29d 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/flp30-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/flp30-c.rst @@ -4,7 +4,7 @@ cert-flp30-c ============ The `cert-flp30-c` check is an alias, please see -`bugprone-float-loop-counter <../bugprone/float-loop-counter.html>`_ +:doc:`bugprone-float-loop-counter <../bugprone/float-loop-counter>` for more information This check corresponds to the CERT C Coding Standard rule diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/flp37-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/flp37-c.rst index 05277ef99c911..01c354416cced 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/flp37-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/flp37-c.rst @@ -5,4 +5,5 @@ cert-flp37-c ============ The `cert-flp37-c` check is an alias, please see -:doc:`bugprone-suspicious-memory-comparison <../bugprone/suspicious-memory-comparison>` for more information. +:doc:`bugprone-suspicious-memory-comparison +<../bugprone/suspicious-memory-comparison>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/mem57-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/mem57-cpp.rst index b359d85ad0cdc..29879452d6b8e 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/mem57-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/mem57-cpp.rst @@ -4,7 +4,8 @@ cert-mem57-cpp ============== The `cert-mem57-cpp` is an aliaes, please see -`bugprone-default-operator-new-on-overaligned-type <../bugprone/default-operator-new-on-overaligned-type.html>`_ +:doc:`bugprone-default-operator-new-on-overaligned-type +<../bugprone/default-operator-new-on-overaligned-type>` for more information. This check corresponds to the CERT C++ Coding Standard rule diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/msc50-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/msc50-cpp.rst index debf01cf2d332..3f4b2a8cde680 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/msc50-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/msc50-cpp.rst @@ -3,9 +3,9 @@ cert-msc50-cpp ============== -Pseudorandom number generators use mathematical algorithms to produce a sequence -of numbers with good statistical properties, but the numbers produced are not -genuinely random. The ``std::rand()`` function takes a seed (number), runs a -mathematical operation on it and returns the result. By manipulating the seed -the result can be predictable. This check warns for the usage of -``std::rand()``. +Pseudorandom number generators use mathematical algorithms to produce a +sequence of numbers with good statistical properties, but the numbers +produced are not genuinely random. The ``std::rand()`` function takes a +seed (number), runs a mathematical operation on it and returns the result. +By manipulating the seed the result can be predictable. This check warns +for the usage of ``std::rand()``. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst index a9b8672091bc6..dbaed1dbcbb15 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst @@ -6,9 +6,10 @@ cert-msc51-cpp ============== The `cert-msc51-cpp` check is an alias, please see -:doc:`bugprone-random-generator-seed <../bugprone/random-generator-seed>` +:doc:`bugprone-random-generator-seed +<../bugprone/random-generator-seed>` for more information. This check corresponds to the CERT C++ Coding Standard rule `MSC51-CPP. Ensure your random number generator is properly seeded -<https://wiki.sei.cmu.edu/confluence/display/cplusplus/MSC51-CPP.+Ensure+your+random+number+generator+is+properly+seeded>`_. \ No newline at end of file +<https://wiki.sei.cmu.edu/confluence/display/cplusplus/MSC51-CPP.+Ensure+your+random+number+generator+is+properly+seeded>`_. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/oop54-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/oop54-cpp.rst index e7c957488507f..1e8b7bb5e7cb9 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/oop54-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/oop54-cpp.rst @@ -6,5 +6,6 @@ cert-oop54-cpp ============== The `cert-oop54-cpp` check is an alias, please see -:doc:`bugprone-unhandled-self-assignment <../bugprone/unhandled-self-assignment>` +:doc:`bugprone-unhandled-self-assignment +<../bugprone/unhandled-self-assignment>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/oop57-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/oop57-cpp.rst index 414f788bf2500..9a0f38b04f6d5 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/oop57-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/oop57-cpp.rst @@ -6,7 +6,8 @@ cert-oop57-cpp ============== The `cert-oop57-cpp` check is an alias, please see -`bugprone-raw-memory-call-on-non-trivial-type <../bugprone/raw-memory-call-on-non-trivial-type.html>`_ +:doc:`bugprone-raw-memory-call-on-non-trivial-type +<../bugprone/raw-memory-call-on-non-trivial-type>` for more information. This check corresponds to the CERT C++ Coding Standard rule diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/oop58-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/oop58-cpp.rst index e435490f0711a..2efa68f22b503 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/oop58-cpp.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/oop58-cpp.rst @@ -6,5 +6,6 @@ cert-oop58-cpp ============== The `cert-oop58-cpp` check is an alias, please see -:doc:`bugprone-copy-constructor-mutates-argument <../bugprone/copy-constructor-mutates-argument>` -for more information. \ No newline at end of file +:doc:`bugprone-copy-constructor-mutates-argument +<../bugprone/copy-constructor-mutates-argument>` +for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/pos44-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/pos44-c.rst index 2fd6c5c4b99a2..c5141b9a8a1c4 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/pos44-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/pos44-c.rst @@ -6,4 +6,5 @@ cert-pos44-c ============ The `cert-pos44-c` check is an alias, please see -:doc:`bugprone-bad-signal-to-kill-thread <../bugprone/bad-signal-to-kill-thread>` for more information. +:doc:`bugprone-bad-signal-to-kill-thread +<../bugprone/bad-signal-to-kill-thread>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/pos47-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/pos47-c.rst index 9b62a3ab9a366..ad5570ab04282 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cert/pos47-c.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cert/pos47-c.rst @@ -6,4 +6,5 @@ cert-pos47-c ============ The `cert-pos47-c` check is an alias, please see -:doc:`concurrency-thread-canceltype-asynchronous <../concurrency/thread-canceltype-asynchronous>` for more information. +:doc:`concurrency-thread-canceltype-asynchronous +<../concurrency/thread-canceltype-asynchronous>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.SetgidSetuidOrder.rst b/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.SetgidSetuidOrder.rst index b3ba78597a5ba..bb1f5d7e2bdfd 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.SetgidSetuidOrder.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.SetgidSetuidOrder.rst @@ -5,12 +5,13 @@ clang-analyzer-security.SetgidSetuidOrder ========================================= -The checker checks for sequences of ``setuid(getuid())`` and ``setgid(getgid())`` -calls (in this order). If such a sequence is found and there is no other -privilege-changing function call (``seteuid``, ``setreuid``, ``setresuid`` and -the GID versions of these) in between, a warning is generated. The checker finds -only exactly ``setuid(getuid())`` calls (and the GID versions), not for example -if the result of ``getuid()`` is stored in a variable. +The checker checks for sequences of ``setuid(getuid())`` and +``setgid(getgid())`` calls (in this order). If such a sequence is found and +there is no other privilege-changing function call (``seteuid``, ``setreuid``, +``setresuid`` and the GID versions of these) in between, a warning is +generated. The checker finds only exactly ``setuid(getuid())`` calls (and the +GID versions), not for example if the result of ``getuid()`` is stored in +a variable. The `clang-analyzer-security.SetgidSetuidOrder` check is an alias, please see `Clang Static Analyzer Available Checkers diff --git a/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.insecureAPI.decodeValueOfObjCType.rst b/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.insecureAPI.decodeValueOfObjCType.rst index 4405f721a66dd..6b926f3638ee5 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.insecureAPI.decodeValueOfObjCType.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/security.insecureAPI.decodeValueOfObjCType.rst @@ -1,9 +1,13 @@ .. title:: clang-tidy - clang-analyzer-security.insecureAPI.decodeValueOfObjCType +.. meta:: + :http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-decodevalueofobjctype clang-analyzer-security.insecureAPI.decodeValueOfObjCType ========================================================= Warn on uses of the '-decodeValueOfObjCType:at:' method. -The clang-analyzer-security.insecureAPI.decodeValueOfObjCType check is an alias of -Clang Static Analyzer security.insecureAPI.decodeValueOfObjCType. +The `clang-analyzer-security.insecureAPI.decodeValueOfObjCType` check is an alias, please see +`Clang Static Analyzer security.insecureAPI.decodeValueOfObjCType +<https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-decodevalueofobjctype>`_ +for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/unix.StdCLibraryFunctions.rst b/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/unix.StdCLibraryFunctions.rst index 17906732c86f7..0415dab9927db 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/unix.StdCLibraryFunctions.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/clang-analyzer/unix.StdCLibraryFunctions.rst @@ -5,8 +5,8 @@ clang-analyzer-unix.StdCLibraryFunctions ======================================== -Check for invalid arguments of C standard library functions, and apply relations -between arguments and return value. +Check for invalid arguments of C standard library functions, and apply +relations between arguments and return value. The `clang-analyzer-unix.StdCLibraryFunctions` check is an alias, please see `Clang Static Analyzer Available Checkers diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-c-arrays.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-c-arrays.rst index f3fba94ed01f1..be9b80ad21829 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-c-arrays.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-c-arrays.rst @@ -5,6 +5,6 @@ cppcoreguidelines-avoid-c-arrays ================================ -The cppcoreguidelines-avoid-c-arrays check is an alias, please see +The `cppcoreguidelines-avoid-c-arrays` check is an alias, please see :doc:`modernize-avoid-c-arrays <../modernize/avoid-c-arrays>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-capturing-lambda-coroutines.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-capturing-lambda-coroutines.rst index 74ec5045a6bbf..14e5806625b5b 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-capturing-lambda-coroutines.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-capturing-lambda-coroutines.rst @@ -17,9 +17,9 @@ This issue can occur even with refcounted smart pointers and copyable types. When a lambda expression creates a coroutine, it results in a closure object with storage, which is often on the stack and will eventually go out of scope. When the closure object goes out of scope, its captures also go out of scope. -While normal lambdas finish executing before this happens, coroutine lambdas may -resume from suspension after the closure object has been destructed, resulting -in use-after-free memory access for all captures. +While normal lambdas finish executing before this happens, coroutine lambdas +may resume from suspension after the closure object has been destructed, +resulting in use-after-free memory access for all captures. Consider the following example: diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-do-while.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-do-while.rst index 4b195c92e1f76..299ff1e12e0bf 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-do-while.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-do-while.rst @@ -3,9 +3,10 @@ cppcoreguidelines-avoid-do-while ================================ -Warns when using ``do-while`` loops. They are less readable than plain ``while`` -loops, since the termination condition is at the end and the condition is not -checked prior to the first iteration. This can lead to subtle bugs. +Warns when using ``do-while`` loops. They are less readable than plain +``while`` loops, since the termination condition is at the end and the +condition is not checked prior to the first iteration. +This can lead to subtle bugs. This check implements `ES.75 <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-do>`_ diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-magic-numbers.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-magic-numbers.rst index 119b1fd3d0dd1..22e4b954fed22 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-magic-numbers.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-magic-numbers.rst @@ -5,6 +5,6 @@ cppcoreguidelines-avoid-magic-numbers ===================================== -The cppcoreguidelines-avoid-magic-numbers check is an alias, please see +The `cppcoreguidelines-avoid-magic-numbers` check is an alias, please see :doc:`readability-magic-numbers <../readability/magic-numbers>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-reference-coroutine-parameters.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-reference-coroutine-parameters.rst index b44430a14b3f8..3f8bf9f7a9e02 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-reference-coroutine-parameters.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-reference-coroutine-parameters.rst @@ -3,8 +3,9 @@ cppcoreguidelines-avoid-reference-coroutine-parameters ====================================================== -Warns when a coroutine accepts reference parameters. After a coroutine suspend point, -references could be dangling and no longer valid. Instead, pass parameters as values. +Warns when a coroutine accepts reference parameters. After a coroutine suspend +point, references could be dangling and no longer valid. Instead, pass +parameters as values. Examples: diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/c-copy-assignment-signature.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/c-copy-assignment-signature.rst index 986b63bc5c78e..46311986c1d15 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/c-copy-assignment-signature.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/c-copy-assignment-signature.rst @@ -5,6 +5,6 @@ cppcoreguidelines-c-copy-assignment-signature ============================================= -The `cppcoreguidelines-c-copy-assignment-signature` check is an alias, please see -:doc:`misc-unconventional-assign-operator <../misc/unconventional-assign-operator>` -for more information. +The `cppcoreguidelines-c-copy-assignment-signature` check is an alias, +please see :doc:`misc-unconventional-assign-operator +<../misc/unconventional-assign-operator>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/explicit-virtual-functions.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/explicit-virtual-functions.rst index e9a703c3b3e26..a7069d2231cc2 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/explicit-virtual-functions.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/explicit-virtual-functions.rst @@ -5,6 +5,6 @@ cppcoreguidelines-explicit-virtual-functions ============================================ -The `cppcoreguidelines-explicit-virtual-functions` check is an alias, please see -:doc:`modernize-use-override <../modernize/use-override>` +The `cppcoreguidelines-explicit-virtual-functions` check is an alias, +please see :doc:`modernize-use-override <../modernize/use-override>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/macro-to-enum.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/macro-to-enum.rst index e64f0305de1ea..5686624e88419 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/macro-to-enum.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/macro-to-enum.rst @@ -5,5 +5,6 @@ cppcoreguidelines-macro-to-enum =============================== -The cppcoreguidelines-macro-to-enum check is an alias, please see -:doc:`modernize-macro-to-enum <../modernize/macro-to-enum>` for more information. +The `cppcoreguidelines-macro-to-enum` check is an alias, please see +:doc:`modernize-macro-to-enum <../modernize/macro-to-enum>` +for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/narrowing-conversions.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/narrowing-conversions.rst index ea24e870d32d4..b1d3e40d838bc 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/narrowing-conversions.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/narrowing-conversions.rst @@ -9,6 +9,6 @@ This check implements part of `ES.46 <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es46-avoid-lossy-narrowing-truncating-arithmetic-conversions>`_ from the C++ Core Guidelines. -The cppcoreguidelines-narrowing-conversions check is an alias, please see +The `cppcoreguidelines-narrowing-conversions` check is an alias, please see :doc:`bugprone-narrowing-conversions <../bugprone/narrowing-conversions>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst index e3a162078a3b8..632a6ad0bc436 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst @@ -4,10 +4,10 @@ cppcoreguidelines-no-malloc =========================== This check handles C-Style memory management using ``malloc()``, ``realloc()``, -``calloc()`` and ``free()``. It warns about its use and tries to suggest the use -of an appropriate RAII object. -Furthermore, it can be configured to check against a user-specified list of functions -that are used for memory management (e.g. ``posix_memalign()``). +``calloc()`` and ``free()``. It warns about its use and tries to suggest the +use of an appropriate RAII object. +Furthermore, it can be configured to check against a user-specified list of +functions that are used for memory management (e.g. ``posix_memalign()``). This check implements `R.10 <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-mallocfree>`_ diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/noexcept-move-operations.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/noexcept-move-operations.rst index a4b0f7d17253a..ca6b92c15f0ff 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/noexcept-move-operations.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/noexcept-move-operations.rst @@ -9,5 +9,5 @@ This check implements `C.66 <https://isocpp.github.io/CppCoreGuidelines/CppCoreG from the C++ Core Guidelines. The `cppcoreguidelines-noexcept-move-operations` check is an alias, please see -:doc:`performance-noexcept-move-constructor <../performance/noexcept-move-constructor>` -for more information. +:doc:`performance-noexcept-move-constructor +<../performance/noexcept-move-constructor>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/non-private-member-variables-in-classes.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/non-private-member-variables-in-classes.rst index 7f18c17498d39..a08bb5c31efba 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/non-private-member-variables-in-classes.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/non-private-member-variables-in-classes.rst @@ -5,7 +5,6 @@ cppcoreguidelines-non-private-member-variables-in-classes ========================================================= -The cppcoreguidelines-non-private-member-variables-in-classes check is an alias, -please see -:doc:`misc-non-private-member-variables-in-classes <../misc/non-private-member-variables-in-classes>` -for more information. +The `cppcoreguidelines-non-private-member-variables-in-classes` check is +an alias, please see :doc:`misc-non-private-member-variables-in-classes +<../misc/non-private-member-variables-in-classes>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst index 4fc49f8bd6eee..91d78002ff709 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst @@ -3,9 +3,9 @@ cppcoreguidelines-owning-memory =============================== -This check implements the type-based semantics of ``gsl::owner<T*>``, which allows -static analysis on code, that uses raw pointers to handle resources like -dynamic memory, but won't introduce RAII concepts. +This check implements the type-based semantics of ``gsl::owner<T*>``, which +allows static analysis on code, that uses raw pointers to handle resources +like dynamic memory, but won't introduce RAII concepts. This check implements `I.11 <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#i11-never-transfer-ownership-by-a-raw-pointer-t-or-reference-t>`_, @@ -27,9 +27,10 @@ the `Guideline Support Library <https://isocpp.github.io/CppCoreGuidelines/CppCo All checks are purely type based and not (yet) flow sensitive. -The following examples will demonstrate the correct and incorrect initializations -of owners, assignment is handled the same way. Note that both ``new`` and -``malloc()``-like resource functions are considered to produce resources. +The following examples will demonstrate the correct and incorrect +initializations of owners, assignment is handled the same way. +Note that both ``new`` and ``malloc()``-like resource functions are +considered to produce resources. .. code-block:: c++ @@ -62,8 +63,9 @@ to be deleted. gsl::owner<int*> Owner = new int(42); // Good delete Owner; // Good as well, statically enforced, that only owners get deleted -The check will furthermore ensure, that functions, that expect a ``gsl::owner<T*>`` as -argument get called with either a ``gsl::owner<T*>`` or a newly created resource. +The check will furthermore ensure, that functions, that expect a +``gsl::owner<T*>`` as argument get called with either a ``gsl::owner<T*>`` or +a newly created resource. .. code-block:: c++ @@ -164,8 +166,8 @@ Known code constructs that do not get diagnosed correctly are: // False positive, getValue returns int* and not gsl::owner<int*> gsl::owner<int*> OwnedInt = Owner.getValue(); -Another limitation of the current implementation is only the type based checking. -Suppose you have code like the following: +Another limitation of the current implementation is only the type based +checking. Suppose you have code like the following: .. code-block:: c++ @@ -176,9 +178,9 @@ Suppose you have code like the following: Owner2 = Owner1; // Conceptual Leak of initial resource of Owner2! Owner1 = nullptr; -The semantic of a ``gsl::owner<T*>`` is mostly like a ``std::unique_ptr<T>``, therefore -assignment of two ``gsl::owner<T*>`` is considered a move, which requires that the -resource ``Owner2`` must have been released before the assignment. -This kind of condition could be caught in later improvements of this check with -flowsensitive analysis. Currently, the `Clang Static Analyzer` catches this bug -for dynamic memory, but not for general types of resources. +The semantic of a ``gsl::owner<T*>`` is mostly like a ``std::unique_ptr<T>``, +therefore assignment of two ``gsl::owner<T*>`` is considered a move, which +requires that the resource ``Owner2`` must have been released before the +assignment. This kind of condition could be caught in later improvements of +this check with flowsensitive analysis. Currently, the `Clang Static Analyzer` +catches this bug for dynamic memory, but not for general types of resources. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/prefer-member-initializer.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/prefer-member-initializer.rst index 6d1bdb93cc7b0..12aeaa8c41041 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/prefer-member-initializer.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/prefer-member-initializer.rst @@ -16,7 +16,8 @@ from the C++ Core Guidelines. Please note, that this check does not enforce rule `C.48 <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c48-prefer-in-class-initializers-to-member-initializers-in-constructors-for-constant-initializers>`_ from the C++ Core Guidelines. For that purpose -see check :doc:`modernize-use-default-member-init <../modernize/use-default-member-init>`. +see check :doc:`modernize-use-default-member-init +<../modernize/use-default-member-init>`. Example 1 --------- diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-avoid-unchecked-container-access.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-avoid-unchecked-container-access.rst index f45bca684d492..99107a33fccb2 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-avoid-unchecked-container-access.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-avoid-unchecked-container-access.rst @@ -25,8 +25,8 @@ and will generate a warning. -STL containers for which ``operator[]`` is well-defined for all inputs are excluded -from this check (e.g.: ``std::map::operator[]``). +STL containers for which ``operator[]`` is well-defined for all inputs are +excluded from this check (e.g.: ``std::map::operator[]``). This check enforces part of the `SL.con.3 <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#slcon3-avoid-bounds-errors>` diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-const-cast.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-const-cast.rst index 961a591cb81f8..80584526f13dd 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-const-cast.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-const-cast.rst @@ -16,10 +16,10 @@ attempts to change the value of that variable. Removing the ``volatile`` qualifier in C++ can have serious consequences. This qualifier indicates that a variable's value can change unpredictably, and -removing it may lead to undefined behavior, optimization problems, and debugging -challenges. It's essential to retain the ``volatile`` qualifier in situations -where the variable's volatility is a crucial aspect of program correctness and -reliability. +removing it may lead to undefined behavior, optimization problems, and +debugging challenges. It's essential to retain the ``volatile`` qualifier in +situations where the variable's volatility is a crucial aspect of program +correctness and reliability. This rule is part of the `Type safety (Type 3) <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Pro-type-constcast>`_ diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-cstyle-cast.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-cstyle-cast.rst index daa93c66641a0..9f9db39f27197 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-cstyle-cast.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-cstyle-cast.rst @@ -7,12 +7,12 @@ This check flags all use of C-style casts that perform a ``static_cast`` downcast, ``const_cast``, or ``reinterpret_cast``. Use of these casts can violate type safety and cause the program to access a -variable that is actually of type X to be accessed as if it were of an unrelated -type Z. Note that a C-style ``(T)expression`` cast means to perform the first of -the following that is possible: a ``const_cast``, a ``static_cast``, a -``static_cast`` followed by a ``const_cast``, a ``reinterpret_cast``, or a -``reinterpret_cast`` followed by a ``const_cast``. This rule bans -``(T)expression`` only when used to perform an unsafe cast. +variable that is actually of type X to be accessed as if it were of an +unrelated type Z. Note that a C-style ``(T)expression`` cast means to perform +the first of the following that is possible: a ``const_cast``, a +``static_cast``, a ``static_cast`` followed by a ``const_cast``, a +``reinterpret_cast``, or a ``reinterpret_cast`` followed by a ``const_cast``. +This rule bans ``(T)expression`` only when used to perform an unsafe cast. This rule is part of the `Type safety (Type.4) <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Pro-type-cstylecast>`_ diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst index 3c6797bce9450..e27ef0572ee67 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst @@ -20,9 +20,9 @@ account but generates false positives for fields initialized in methods invoked in the constructor body. The check also flags variables with automatic storage duration that have record -types without a user-provided constructor and are not initialized. The suggested -fix is to zero initialize the variable via ``{}`` for C++11 and beyond or ``= -{}`` for older language versions. +types without a user-provided constructor and are not initialized. The +suggested fix is to zero initialize the variable via ``{}`` for C++11 and +beyond or ``= {}`` for older language versions. Options ------- diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-vararg.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-vararg.rst index e74b00694630b..c24ff340cb7f3 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-vararg.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-vararg.rst @@ -11,8 +11,8 @@ To allow for SFINAE use of vararg functions, a call is not flagged if a literal context. Passing to varargs assumes the correct type will be read. This is fragile -because it cannot generally be enforced to be safe in the language and so relies -on programmer discipline to get it right. +because it cannot generally be enforced to be safe in the language and so +relies on programmer discipline to get it right. This rule is part of the `Type safety (Type.8) <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Pro-type-varargs>`_ diff --git a/clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst b/clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst index bed9e5ac0cfd0..ad872837a9775 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst @@ -3,9 +3,9 @@ fuchsia-statically-constructed-objects ====================================== -Warns if global, non-trivial objects with static storage are constructed, unless -the object is statically initialized with a ``constexpr`` constructor or has no -explicit constructor. +Warns if global, non-trivial objects with static storage are constructed, +unless the object is statically initialized with a ``constexpr`` constructor +or has no explicit constructor. For example: diff --git a/clang-tools-extra/docs/clang-tidy/checks/google/explicit-constructor.rst b/clang-tools-extra/docs/clang-tidy/checks/google/explicit-constructor.rst index acafc1acfb0cc..1bef2686139b3 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/google/explicit-constructor.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/google/explicit-constructor.rst @@ -23,8 +23,8 @@ Consider this example: return a == b; } -The function will return ``true``, since the objects are implicitly converted to -``bool`` before comparison, which is unlikely to be the intent. +The function will return ``true``, since the objects are implicitly converted +to ``bool`` before comparison, which is unlikely to be the intent. The check will suggest inserting ``explicit`` before the constructor or conversion operator declaration. However, copy and move constructors should not diff --git a/clang-tools-extra/docs/clang-tidy/checks/google/objc-avoid-throwing-exception.rst b/clang-tools-extra/docs/clang-tidy/checks/google/objc-avoid-throwing-exception.rst index 50441f7bde5b8..bd099c40a0310 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/google/objc-avoid-throwing-exception.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/google/objc-avoid-throwing-exception.rst @@ -11,7 +11,8 @@ exceptions from Objective-C code. The corresponding C++ style guide rule: https://google.github.io/styleguide/cppguide.html#Exceptions -Instead, prefer passing in ``NSError **`` and return ``BOOL`` to indicate success or failure. +Instead, prefer passing in ``NSError **`` and return ``BOOL`` to indicate +success or failure. A counterexample: diff --git a/clang-tools-extra/docs/clang-tidy/checks/google/objc-global-variable-declaration.rst b/clang-tools-extra/docs/clang-tidy/checks/google/objc-global-variable-declaration.rst index 84c97767f18f1..105b4ffb457dd 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/google/objc-global-variable-declaration.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/google/objc-global-variable-declaration.rst @@ -9,9 +9,9 @@ pattern of variable names in Google's Objective-C Style Guide. The corresponding style guide rule: https://google.github.io/styleguide/objcguide.html#variable-names -All the global variables should follow the pattern of ``g[A-Z].*`` (variables) or -``k[A-Z].*`` (constants). The check will suggest a variable name that follows the -pattern if it can be inferred from the original name. +All the global variables should follow the pattern of ``g[A-Z].*`` (variables) +or ``k[A-Z].*`` (constants). The check will suggest a variable name that +follows the pattern if it can be inferred from the original name. For code: @@ -43,5 +43,5 @@ However for code that prefixed with non-alphabetical characters like: static NSString* __anotherString = @"world"; -The check will give a warning message but will not be able to suggest a fix. The -user needs to fix it on their own. +The check will give a warning message but will not be able to suggest +a fix. The user needs to fix it on their own. diff --git a/clang-tools-extra/docs/clang-tidy/checks/google/readability-avoid-underscore-in-googletest-name.rst b/clang-tools-extra/docs/clang-tidy/checks/google/readability-avoid-underscore-in-googletest-name.rst index e667fd12222bb..a1da79d4f304d 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/google/readability-avoid-underscore-in-googletest-name.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/google/readability-avoid-underscore-in-googletest-name.rst @@ -25,8 +25,8 @@ would trigger the check. `Underscores are not allowed`_ in test suite name nor test names. The ``DISABLED_`` prefix, which may be used to -`disable test suites and individual tests`_, is removed from the test suite name -and test name before checking for underscores. +`disable test suites and individual tests`_, is removed from the test suite +name and test name before checking for underscores. This check does not propose any fixes. diff --git a/clang-tools-extra/docs/clang-tidy/checks/google/readability-braces-around-statements.rst b/clang-tools-extra/docs/clang-tidy/checks/google/readability-braces-around-statements.rst index 6130609fb11b4..764694ed1b94d 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/google/readability-braces-around-statements.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/google/readability-braces-around-statements.rst @@ -6,5 +6,6 @@ google-readability-braces-around-statements =========================================== The `google-readability-braces-around-statements` check is an alias, please see -:doc:`readability-braces-around-statements <../readability/braces-around-statements>` +:doc:`readability-braces-around-statements +<../readability/braces-around-statements>` for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/google/upgrade-googletest-case.rst b/clang-tools-extra/docs/clang-tidy/checks/google/upgrade-googletest-case.rst index 8759283a9c839..df983691bba5c 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/google/upgrade-googletest-case.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/google/upgrade-googletest-case.rst @@ -17,8 +17,8 @@ check to remove deprecated names. The affected APIs are: - Member functions of ``testing::Test``, ``testing::TestInfo``, - ``testing::TestEventListener``, ``testing::UnitTest``, and any type inheriting - from these types + ``testing::TestEventListener``, ``testing::UnitTest``, and any type + inheriting from these types - The macros ``TYPED_TEST_CASE``, ``TYPED_TEST_CASE_P``, ``REGISTER_TYPED_TEST_CASE_P``, and ``INSTANTIATE_TYPED_TEST_CASE_P`` - The type alias ``testing::TestCase`` diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst index a4014b5f15f0b..d9102f0327b88 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -548,7 +548,7 @@ Check aliases :doc:`clang-analyzer-security.insecureAPI.bcmp <clang-analyzer/security.insecureAPI.bcmp>`, `Clang Static Analyzer security.insecureAPI.bcmp <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bcmp>`_, :doc:`clang-analyzer-security.insecureAPI.bcopy <clang-analyzer/security.insecureAPI.bcopy>`, `Clang Static Analyzer security.insecureAPI.bcopy <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bcopy>`_, :doc:`clang-analyzer-security.insecureAPI.bzero <clang-analyzer/security.insecureAPI.bzero>`, `Clang Static Analyzer security.insecureAPI.bzero <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-bzero>`_, - :doc:`clang-analyzer-security.insecureAPI.decodeValueOfObjCType <clang-analyzer/security.insecureAPI.decodeValueOfObjCType>`, Clang Static Analyzer security.insecureAPI.decodeValueOfObjCType, + :doc:`clang-analyzer-security.insecureAPI.decodeValueOfObjCType <clang-analyzer/security.insecureAPI.decodeValueOfObjCType>`, `Clang Static Analyzer security.insecureAPI.decodeValueOfObjCType <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-decodevalueofobjctype>`_, :doc:`clang-analyzer-security.insecureAPI.getpw <clang-analyzer/security.insecureAPI.getpw>`, `Clang Static Analyzer security.insecureAPI.getpw <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-getpw>`_, :doc:`clang-analyzer-security.insecureAPI.gets <clang-analyzer/security.insecureAPI.gets>`, `Clang Static Analyzer security.insecureAPI.gets <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-gets>`_, :doc:`clang-analyzer-security.insecureAPI.mkstemp <clang-analyzer/security.insecureAPI.mkstemp>`, `Clang Static Analyzer security.insecureAPI.mkstemp <https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-mkstemp>`_, _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
