From 556c422de1c3b0623e83c85b36a43dd743660fb1 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 1 Aug 2022 18:54:10 +0200 Subject: [PATCH] clang-tidy doc: fix some typos --- .../docs/clang-tidy/checks/bugprone/signed-char-misuse.rst | 2 +- .../docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst | 2 +- clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst | 2 +- .../docs/clang-tidy/checks/misc/throw-by-value-catch-by-reference.rst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/signed-char-misuse.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/signed-char-misuse.rst index d0b18bd..72860e8 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/signed-char-misuse.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/signed-char-misuse.rst @@ -47,7 +47,7 @@ A good example from the CERT description when a ``char`` variable is used to read from a file that might contain non-ASCII characters. The problem comes up when the code uses the ``-1`` integer value as EOF, while the 255 character code is also stored as ``-1`` in two's complement form of char type. -See a simple example of this bellow. This code stops not only when it reaches +See a simple example of this below. This code stops not only when it reaches the end of the file, but also when it gets a character with the 255 code. .. code-block:: c++ diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst index 3ed6372..6e9a4e0 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst @@ -269,7 +269,7 @@ The check is aware of aliases of optional types that are created via Lambdas ------- -The check does not currently report unsafe optional acceses in lambdas. +The check does not currently report unsafe optional accesses in lambdas. A future version will expand the scope to lambdas, following the rules outlined above. It is best to follow the same principles when using optionals in lambdas. 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 4a05629..c75ee8d 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 @@ -5,7 +5,7 @@ cert-err33-c Warns on unused function return values. Many of the standard library functions return a value that indicates if the call was successful. Ignoring the returned -value can cause unexpected behavior if an error has occured. The following +value can cause unexpected behavior if an error has occurred. The following functions are checked: * aligned_alloc() 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 c693387..af6ec14 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 @@ -17,7 +17,7 @@ Exceptions: are not susceptible to slicing and the usage of string literals is idiomatic. * Catching character pointers (``char``, ``wchar_t``, unicode character types) - will not be flagged to allow catching sting literals. + will not be flagged to allow catching string literals. * Moved named values will not be flagged as not throwing an anonymous temporary. In this case we can be sure that the user knows that the object can't be accessed outside catch blocks handling the error. -- 2.7.4