diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/switch-missing-default-case.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/switch-missing-default-case.rst index 3ce862ff8afcc..0f0e549091f46 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/switch-missing-default-case.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/switch-missing-default-case.rst @@ -51,6 +51,6 @@ Example: on non-enum types where the compiler warnings may not be present. .. seealso:: - The `CppCoreGuideline ES.79 `_ + The `CppCoreGuideline ES.79 `_ provide guidelines on switch statements, including the recommendation to always provide a default case. 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 14e5806625b5b..58bfc35c557dc 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 @@ -8,7 +8,7 @@ use-after-free errors and suggests avoiding captures or ensuring the lambda closure object has a guaranteed lifetime. This check implements `CP.51 -`_ +`_ from the C++ Core Guidelines. Using coroutine lambdas with non-empty capture lists can be risky, as capturing diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-const-or-ref-data-members.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-const-or-ref-data-members.rst index 57c4829431e76..82bd33708792f 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-const-or-ref-data-members.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-const-or-ref-data-members.rst @@ -44,7 +44,7 @@ Examples: }; This check implements `C.12 -`_ +`_ from the C++ Core Guidelines. Further reading: 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 299ff1e12e0bf..8b0ee304a67f9 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 @@ -9,7 +9,7 @@ condition is not checked prior to the first iteration. This can lead to subtle bugs. This check implements `ES.75 -`_ +`_ from the C++ Core Guidelines. Examples: diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables.rst index 3d5fef3a07dca..b7d2dc874d4ed 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables.rst @@ -6,7 +6,7 @@ cppcoreguidelines-avoid-non-const-global-variables Finds non-const global variables as described in `I.2 `_ of C++ Core Guidelines. -As `R.6 `_ +As `R.6 `_ of C++ Core Guidelines is a duplicate of rule `I.2 `_ it also covers that rule. 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 3f8bf9f7a9e02..887bdc66d938a 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 @@ -18,5 +18,5 @@ Examples: } This check implements `CP.53 -`_ +`_ from the C++ Core Guidelines. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/init-variables.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/init-variables.rst index 0465436234b13..e8ca8238887c5 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/init-variables.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/init-variables.rst @@ -8,8 +8,8 @@ value. These may lead to unexpected behavior if there is a code path that reads the variable before assigning to it. This rule is part of the `Type safety (Type.5) -`_ -profile and `ES.20 `_ +`_ +profile and `ES.20 `_ from the C++ Core Guidelines. Only integers, booleans, floats, doubles and pointers are checked. The fix diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/interfaces-global-init.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/interfaces-global-init.rst index f8e9da9021773..65ff1db9e4907 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/interfaces-global-init.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/interfaces-global-init.rst @@ -7,7 +7,7 @@ This check flags initializers of globals that access extern objects, and therefore can lead to order-of-initialization problems. This check implements `I.22 -`_ +`_ from the C++ Core Guidelines. Note that currently this does not flag calls to non-constexpr functions, and diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/missing-std-forward.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/missing-std-forward.rst index 62e38fcd3b9dc..c2af1239a7d4c 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/missing-std-forward.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/missing-std-forward.rst @@ -43,5 +43,5 @@ Options Specify the function used for forwarding. Default is `::std::forward`. This check implements `F.19 -`_ +`_ from the C++ Core Guidelines. 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 632a6ad0bc436..6b95604d048f4 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 @@ -10,7 +10,7 @@ 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 -`_ +`_ from the C++ Core Guidelines. There is no attempt made to provide fix-it hints, since manual resource diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-suspend-with-lock.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-suspend-with-lock.rst index 59981f2c8d6d3..81b88e3aedc00 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-suspend-with-lock.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-suspend-with-lock.rst @@ -36,5 +36,5 @@ Examples: } This check implements `CP.52 -`_ +`_ from the C++ Core Guidelines. 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 91d78002ff709..218de558358fd 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 @@ -14,7 +14,7 @@ This check implements `I.11 `R.3 `_ and `GSL.Views -`_ +`_ from the C++ Core Guidelines. The definition of a ``gsl::owner`` is straight forward @@ -23,7 +23,7 @@ The definition of a ``gsl::owner`` is straight forward namespace gsl { template owner = T; } It is therefore simple to introduce the owner even without using an implementation of -the `Guideline Support Library `_. +the `Guideline Support Library `_. All checks are purely type based and not (yet) flow sensitive. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-array-to-pointer-decay.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-array-to-pointer-decay.rst index c890e16d2d20f..06de6fcb2c44b 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-array-to-pointer-decay.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-array-to-pointer-decay.rst @@ -9,5 +9,5 @@ Pointers should not be used as arrays. ``span`` is a bounds-checked, safe alternative to using pointers to access arrays. This rule is part of the `Bounds safety (Bounds 3) -`_ +`_ profile from the C++ Core Guidelines. 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 99107a33fccb2..fe78ad8056443 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 @@ -31,7 +31,7 @@ excluded from this check (e.g.: ``std::map::operator[]``). This check enforces part of the `SL.con.3 ` guideline and is part of the `Bounds Safety (Bounds 4) -` +` profile from the C++ Core Guidelines. Options diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.rst index 9b82e0c45a314..4eddeb489a1db 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.rst @@ -9,7 +9,7 @@ are out of bounds (for ``std::array``). For out-of-bounds checking of static arrays, see the `-Warray-bounds` Clang diagnostic. This rule is part of the `Bounds safety (Bounds 2) -`_ +`_ profile from the C++ Core Guidelines. Optionally, this check can generate fixes using ``gsl::at`` for indexing. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-pointer-arithmetic.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-pointer-arithmetic.rst index a3f13714e809c..3f020090f8612 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-pointer-arithmetic.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-pointer-arithmetic.rst @@ -11,7 +11,7 @@ and easy to get wrong. ``span`` is a bounds-checked, safe type for accessing arrays of data. This rule is part of the `Bounds safety (Bounds 1) -`_ +`_ profile from the C++ Core Guidelines. Options 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 80584526f13dd..b5cc486aa4a0a 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 @@ -22,7 +22,7 @@ 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) -`_ +`_ profile and `ES.50: Don’t cast away const `_ rule from the C++ Core Guidelines. 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 9f9db39f27197..a94115e9d5e1c 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 @@ -15,5 +15,5 @@ the first of the following that is possible: a ``const_cast``, a This rule bans ``(T)expression`` only when used to perform an unsafe cast. This rule is part of the `Type safety (Type.4) -`_ +`_ profile from the C++ Core Guidelines. 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 e27ef0572ee67..b86083f82300d 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 @@ -40,5 +40,5 @@ Options Default is `false`. This rule is part of the `Type safety (Type.6) -`_ +`_ profile from the C++ Core Guidelines. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-reinterpret-cast.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-reinterpret-cast.rst index a0946825156fc..c2e4170ed098d 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-reinterpret-cast.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-reinterpret-cast.rst @@ -10,5 +10,5 @@ variable that is actually of type ``X`` to be accessed as if it were of an unrelated type ``Z``. This rule is part of the `Type safety (Type.1.1) -`_ +`_ profile from the C++ Core Guidelines. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-static-cast-downcast.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-static-cast-downcast.rst index 333e6db2aacec..21c014577a003 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-static-cast-downcast.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-static-cast-downcast.rst @@ -12,7 +12,7 @@ variable that is actually of type ``X`` to be accessed as if it were of an unrelated type ``Z``. This rule is part of the `Type safety (Type.2) -`_ +`_ profile from the C++ Core Guidelines. Options diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-union-access.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-union-access.rst index 3a5af53331b96..db726a227af31 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-union-access.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-union-access.rst @@ -13,5 +13,5 @@ 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.7) -`_ +`_ profile from the C++ Core Guidelines. 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 c24ff340cb7f3..09809c25c1447 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 @@ -15,5 +15,5 @@ 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) -`_ +`_ profile from the C++ Core Guidelines. diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/special-member-functions.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/special-member-functions.rst index 982d16fc8d23d..1b050a55d4c9f 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/special-member-functions.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/special-member-functions.rst @@ -16,7 +16,7 @@ Note that defining a function with ``= delete`` is considered to be a definition. This check implements `C.21 -`_ +`_ from the C++ Core Guidelines. Options diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/use-default-member-init.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/use-default-member-init.rst index e785f3133e200..55661c003c253 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/use-default-member-init.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/use-default-member-init.rst @@ -5,7 +5,7 @@ cppcoreguidelines-use-default-member-init ========================================= -This check implements `C.48 `_ +This check implements `C.48 `_ from the C++ Core Guidelines. The `cppcoreguidelines-use-default-member-init` check is an alias, please see diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/use-enum-class.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/use-enum-class.rst index 9e9f4c99dc240..9358996a36eba 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/use-enum-class.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/use-enum-class.rst @@ -7,7 +7,7 @@ Finds unscoped (non-class) ``enum`` declarations and suggests using ``enum class`` instead. This check implements `Enum.3 -`_ +`_ from the C++ Core Guidelines." Example: diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/virtual-class-destructor.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/virtual-class-destructor.rst index 752fd81359096..80932c416fe01 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/virtual-class-destructor.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/virtual-class-destructor.rst @@ -8,7 +8,7 @@ nor protected and non-virtual. A virtual class's destructor should be specified in one of these ways to prevent undefined behavior. This check implements -`C.35 `_ +`C.35 `_ from the C++ Core Guidelines. Note that this check will diagnose a class with a virtual method regardless of diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability/magic-numbers.rst b/clang-tools-extra/docs/clang-tidy/checks/readability/magic-numbers.rst index 0b2d819264daa..55d47d568dcdc 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/readability/magic-numbers.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/readability/magic-numbers.rst @@ -9,7 +9,7 @@ code and not introduced via constants or symbols. Many coding guidelines advise replacing the magic values with symbolic constants to improve readability. Here are a few references: - * `Rule ES.45: Avoid "magic constants"; use symbolic constants in C++ Core Guidelines `_ + * `Rule ES.45: Avoid "magic constants"; use symbolic constants in C++ Core Guidelines `_ * `Rule 5.1.1 Use symbolic names instead of literal values in code in High Integrity C++ `_ * Item 17 in "C++ Coding Standards: 101 Rules, Guidelines and Best Practices" by Herb Sutter and Andrei Alexandrescu