From d8afa5777b66f6193aac3c6b0dcb5680f8cf0d3d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 1 Sep 2021 08:48:31 -0700 Subject: [PATCH] [clang-tidy] Fix documentation typos (NFC) --- .../clang-tidy/checks/abseil-no-internal-dependencies.rst | 2 +- .../docs/clang-tidy/checks/abseil-time-subtraction.rst | 2 +- .../docs/clang-tidy/checks/bugprone-fold-init-type.rst | 2 +- .../checks/bugprone-redundant-branch-condition.rst | 2 +- .../docs/clang-tidy/checks/bugprone-signal-handler.rst | 2 +- .../checks/bugprone-suspicious-memory-comparison.rst | 4 ++-- .../clang-tidy/checks/bugprone-too-small-loop-variable.rst | 2 +- .../checks/bugprone-unhandled-exception-at-new.rst | 2 +- clang-tools-extra/docs/clang-tidy/checks/cert-oop57-cpp.rst | 6 +++--- .../checks/cppcoreguidelines-narrowing-conversions.rst | 2 +- .../clang-tidy/checks/google-upgrade-googletest-case.rst | 2 +- .../docs/clang-tidy/checks/hicpp-no-assembler.rst | 2 +- .../clang-tidy/checks/readability-redundant-member-init.rst | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst b/clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst index 75e72adf5f36..1032cc3db5fa 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst @@ -5,7 +5,7 @@ abseil-no-internal-dependencies Warns if code using Abseil depends on internal details. If something is in a namespace that includes the word "internal", code is not allowed to depend upon -it beaucse it’s an implementation detail. They cannot friend it, include it, +it because it’s an implementation detail. They cannot friend it, include it, you mention it or refer to it in any way. Doing so violates Abseil's compatibility guidelines and may result in breakage. See https://abseil.io/about/compatibility for more information. diff --git a/clang-tools-extra/docs/clang-tidy/checks/abseil-time-subtraction.rst b/clang-tools-extra/docs/clang-tidy/checks/abseil-time-subtraction.rst index 196c07362ffc..c717ed389216 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/abseil-time-subtraction.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/abseil-time-subtraction.rst @@ -25,7 +25,7 @@ Examples: int x; absl::Time t; - // Original - absl::Duration result and first operand is a absl::Time. + // Original - absl::Duration result and first operand is an absl::Time. absl::Duration d = absl::Seconds(absl::ToUnixSeconds(t) - x); // Suggestion - Perform subtraction in the Time domain instead. diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-fold-init-type.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-fold-init-type.rst index 3b1bd7ff3a79..8c6872d72f11 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-fold-init-type.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-fold-init-type.rst @@ -11,7 +11,7 @@ the latter, with ``operator+`` by default. This can cause loss of precision through: - Truncation: The following code uses a floating point range and an int - initial value, so trucation will happen at every application of ``operator+`` + initial value, so truncation will happen at every application of ``operator+`` and the result will be `0`, which might not be what the user expected. .. code-block:: c++ diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-redundant-branch-condition.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-redundant-branch-condition.rst index c2746914e754..a6fff9c29ab2 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-redundant-branch-condition.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-redundant-branch-condition.rst @@ -41,7 +41,7 @@ is an operand of a logical "and" (``&&``) or a logical "or" (``||``) operator: In the first case (logical "and") the suggested fix is to remove the redundant condition variable and keep the other side of the ``&&``. In the second case -(logical "or") the whole ``if`` is removed similarily to the simple case on the +(logical "or") the whole ``if`` is removed similarly to the simple case on the top. The condition of the outer ``if`` statement may also be a logical "and" (``&&``) diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-signal-handler.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-signal-handler.rst index fa05460ab93d..3ef05711ba51 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-signal-handler.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-signal-handler.rst @@ -20,7 +20,7 @@ and has an alias name ``cert-sig30-c``. .. option:: AsyncSafeFunctionSet - Selects wich set of functions is considered as asynchronous-safe + Selects which set of functions is considered as asynchronous-safe (and therefore allowed in signal handlers). Value ``minimal`` selects a minimal set that is defined in the CERT SIG30-C rule and includes functions ``abort()``, ``_Exit()``, ``quick_exit()`` and ``signal()``. Value ``POSIX`` 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 a2d5c6d9a23c..2ae67eac523c 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 @@ -8,12 +8,12 @@ arguments. The following cases are covered: **Case 1: Non-standard-layout type** -Comparing the object representaions of non-standard-layout objects may not +Comparing the object representations of non-standard-layout objects may not properly compare the value representations. **Case 2: Types with no unique object representation** -Objects with the same value may not have the same object representaion. +Objects with the same value may not have the same object representation. This may be caused by padding or floating-point types. See also: diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-too-small-loop-variable.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-too-small-loop-variable.rst index 702541d80dca..1381adc5493c 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-too-small-loop-variable.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-too-small-loop-variable.rst @@ -33,7 +33,7 @@ a larger user input. Upper limit for the magnitude bits of the loop variable. If it's set the check filters out those catches in which the loop variable's type has more magnitude bits as the specified upper limit. The default value is 16. - For example, if the user sets this option to 31 (bits), then a 32-bit ``unsigend int`` + For example, if the user sets this option to 31 (bits), then a 32-bit ``unsigned int`` is ignored by the check, however a 32-bit ``int`` is not (A 32-bit ``signed int`` has 31 magnitude bits). diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst index 01f59af49f81..764ef7a476bd 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst @@ -21,5 +21,5 @@ is allowed to propagate out of the function (exception handler is checked for types ``std::bad_alloc``, ``std::exception``, and catch-all handler). The check assumes that any user-defined ``operator new`` is either ``noexcept`` or may throw an exception of type ``std::bad_alloc`` (or derived -from it). Other exception types or exceptions occuring in the objects's +from it). Other exception types or exceptions occurring in the objects's constructor are not taken into account. 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 ca789766a6e2..653ed2082955 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 @@ -11,7 +11,7 @@ Options .. option:: MemSetNames - Specify extra functions to flag that act similarily to ``memset``. + Specify extra functions to flag that act similarly to ``memset``. Specify names in a semicolon delimited list. Default is an empty string. The check will detect the following functions: @@ -19,7 +19,7 @@ Options .. option:: MemCpyNames - Specify extra functions to flag that act similarily to ``memcpy``. + Specify extra functions to flag that act similarly to ``memcpy``. Specify names in a semicolon delimited list. Default is an empty string. The check will detect the following functions: @@ -28,7 +28,7 @@ Options .. option:: MemCmpNames - Specify extra functions to flag that act similarily to ``memcmp``. + Specify extra functions to flag that act similarly to ``memcmp``. Specify names in a semicolon delimited list. Default is an empty string. The check will detect the following functions: 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 3502fb9c3bda..4085bce4fc29 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 @@ -44,7 +44,7 @@ Options .. option:: WarnWithinTemplateInstantiation When `true`, the check will warn on narrowing conversions within template - instantations. `false` by default. + instantiations. `false` by default. .. option:: WarnOnEquivalentBitWidth 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 511569e85746..8759283a9c83 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 @@ -49,5 +49,5 @@ becomes For better consistency of user code, the check renames both virtual and non-virtual member functions with matching names in derived types. The check -tries to provide a only warning when a fix cannot be made safely, as is the case +tries to provide only a warning when a fix cannot be made safely, as is the case with some template and macro uses. diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp-no-assembler.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp-no-assembler.rst index 8295895ec888..0c5d3a4a10b6 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/hicpp-no-assembler.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/hicpp-no-assembler.rst @@ -5,6 +5,6 @@ hicpp-no-assembler Check for assembler statements. No fix is offered. -Inline assembler is forbidden by the `High Intergrity C++ Coding Standard +Inline assembler is forbidden by the `High Integrity C++ Coding Standard `_ as it restricts the portability of code. diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-member-init.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-member-init.rst index 57d551266ac0..b2f86c4429cc 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-member-init.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-member-init.rst @@ -29,7 +29,7 @@ Options When `true`, the check will ignore unnecessary base class initializations within copy constructors, since some compilers issue warnings/errors when - base classes are not explicitly intialized in copy constructors. For example, + base classes are not explicitly initialized in copy constructors. For example, ``gcc`` with ``-Wextra`` or ``-Werror=extra`` issues warning or error ``base class 'Bar' should be explicitly initialized in the copy constructor`` if ``Bar()`` were removed in the following example: