From 918d393972237fe2f9c0f4c7cd14ed4ec4ba706a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 19 Dec 2019 21:54:38 +0100 Subject: [PATCH] Fix some typos in the clang-tools-extra doc --- clang-tools-extra/docs/clang-doc.rst | 4 ++-- clang-tools-extra/docs/clang-include-fixer.rst | 2 +- .../docs/clang-tidy/checks/abseil-duration-factory-scale.rst | 2 +- .../docs/clang-tidy/checks/abseil-duration-subtraction.rst | 2 +- clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst | 4 ++-- .../docs/clang-tidy/checks/bugprone-exception-escape.rst | 2 +- .../docs/clang-tidy/checks/bugprone-fold-init-type.rst | 2 +- .../docs/clang-tidy/checks/bugprone-suspicious-enum-usage.rst | 2 +- .../docs/clang-tidy/checks/bugprone-unused-return-value.rst | 2 +- .../docs/clang-tidy/checks/cppcoreguidelines-owning-memory.rst | 2 +- clang-tools-extra/docs/clang-tidy/checks/google-runtime-int.rst | 2 +- .../docs/clang-tidy/checks/hicpp-multiway-paths-covered.rst | 2 +- .../docs/clang-tidy/checks/modernize-deprecated-headers.rst | 2 +- clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst | 6 +++--- .../docs/clang-tidy/checks/performance-inefficient-algorithm.rst | 2 +- .../docs/clang-tidy/checks/readability-implicit-bool-conversion.rst | 2 +- clang-tools-extra/docs/clangd/Installation.rst | 2 +- clang-tools-extra/docs/pp-trace.rst | 6 +++--- 18 files changed, 24 insertions(+), 24 deletions(-) diff --git a/clang-tools-extra/docs/clang-doc.rst b/clang-tools-extra/docs/clang-doc.rst index 0c47405..93a6f67 100644 --- a/clang-tools-extra/docs/clang-doc.rst +++ b/clang-tools-extra/docs/clang-doc.rst @@ -7,7 +7,7 @@ Clang-Doc .. toctree:: :maxdepth: 1 -:program:`clang-doc` is a tool for generating C and C++ documenation from +:program:`clang-doc` is a tool for generating C and C++ documentation from source code and comments. The tool is in a very early development stage, so you might encounter bugs and @@ -100,7 +100,7 @@ Options generated if the file is in this dir. --stylesheets= - CSS stylesheets to extend the default styles. -The following flags shoud only be used if ``format`` is set to ``html``: +The following flags should only be used if ``format`` is set to ``html``: - ``repository`` - ``source-root`` - ``stylesheets`` diff --git a/clang-tools-extra/docs/clang-include-fixer.rst b/clang-tools-extra/docs/clang-include-fixer.rst index 783f45e..b934095 100644 --- a/clang-tools-extra/docs/clang-include-fixer.rst +++ b/clang-tools-extra/docs/clang-include-fixer.rst @@ -105,7 +105,7 @@ Customized settings in `.vimrc`: Set to 1 if you want to insert ``#include`` for the symbol under the cursor. Default is 0. Compared to normal mode, this mode won't parse the source file - and only search the sysmbol from database, which is faster than normal mode. + and only search the symbol from database, which is faster than normal mode. See ``clang-include-fixer.py`` for more details. diff --git a/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-factory-scale.rst b/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-factory-scale.rst index 8b99d46..cba5202 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-factory-scale.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-factory-scale.rst @@ -5,7 +5,7 @@ abseil-duration-factory-scale Checks for cases where arguments to ``absl::Duration`` factory functions are scaled internally and could be changed to a different factory function. This -check also looks for arguements with a zero value and suggests using +check also looks for arguments with a zero value and suggests using ``absl::ZeroDuration()`` instead. Examples: diff --git a/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-subtraction.rst b/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-subtraction.rst index b570931..3dfd326 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-subtraction.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-subtraction.rst @@ -30,7 +30,7 @@ Examples: Note: As with other ``clang-tidy`` checks, it is possible that multiple fixes -may overlap (as in the case of nested expressions), so not all occurences can +may overlap (as in the case of nested expressions), so not all occurrences can be transformed in one run. In particular, this may occur for nested subtraction expressions. Running ``clang-tidy`` multiple times will find and fix these overlaps. diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst index b4c07b4..9bcbcab 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst @@ -4,7 +4,7 @@ bugprone-branch-clone ===================== Checks for repeated branches in ``if/else if/else`` chains, consecutive -repeated branches in ``switch`` statements and indentical true and false +repeated branches in ``switch`` statements and identical true and false branches in conditional operators. .. code-block:: c++ @@ -28,7 +28,7 @@ following shorter and cleaner code: do_something(x, y); -If this is the inteded behavior, then there is no reason to use a conditional +If this is the intended behavior, then there is no reason to use a conditional statement; otherwise the issue can be solved by fixing the branch that is handled incorrectly. diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-exception-escape.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-exception-escape.rst index e9653a7..9c7f113 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-exception-escape.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-exception-escape.rst @@ -30,7 +30,7 @@ Options Comma separated list containing function names which should not throw. An example value for this parameter can be ``WinMain`` which adds function - ``WinMain()`` in the Windows API to the list of the funcions which should + ``WinMain()`` in the Windows API to the list of the functions which should not throw. Default value is an empty string. .. option:: IgnoredExceptions 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 ebe3d22..3b1bd7f 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 wil happen at every application of ``operator+`` + initial value, so trucation 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-suspicious-enum-usage.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-suspicious-enum-usage.rst index 5e765be..13de5c5 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-suspicious-enum-usage.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-suspicious-enum-usage.rst @@ -40,7 +40,7 @@ Examples: unsigned flag; flag = A | - H; // OK, disjoint value intervalls in the enum types ->probably good use. + H; // OK, disjoint value intervals in the enum types ->probably good use. flag = B | F; // Warning, have common values so they are probably misused. // Case 2: diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-unused-return-value.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-unused-return-value.rst index 68d8e73..07ce13e 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-unused-return-value.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-unused-return-value.rst @@ -3,7 +3,7 @@ bugprone-unused-return-value ============================ -Warns on unused function return values. The checked funtions can be configured. +Warns on unused function return values. The checked functions can be configured. Options ------- 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 cd19016..a1b86b9 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 @@ -171,6 +171,6 @@ Suppose you have code like the following: The semantic of a ``gsl::owner`` is mostly like a ``std::unique_ptr``, therefore assignment of two ``gsl::owner`` is considered a move, which requires that the resource ``Owner2`` must have been released before the assignment. -This kind of condition could be catched in later improvements of this check with +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/google-runtime-int.rst b/clang-tools-extra/docs/clang-tidy/checks/google-runtime-int.rst index 5e878a4..21a30e6 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/google-runtime-int.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/google-runtime-int.rst @@ -9,7 +9,7 @@ with ``u?intXX(_t)?``. The corresponding style guide rule: https://google.github.io/styleguide/cppguide.html#Integer_Types. -Correspondig cpplint.py check: `runtime/int`. +Corresponding cpplint.py check: `runtime/int`. Options ------- diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp-multiway-paths-covered.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp-multiway-paths-covered.rst index 2cace63..6588132 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/hicpp-multiway-paths-covered.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/hicpp-multiway-paths-covered.rst @@ -82,7 +82,7 @@ Degenerated ``switch`` statements without any labels are caught as well. .. code-block:: c++ - // A completly degenerated switch will be diagnosed. + // A completely degenerated switch will be diagnosed. int i = 42; switch(i) {} diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-headers.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-headers.rst index 4c4750a..9cdd1d4 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-headers.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-headers.rst @@ -10,7 +10,7 @@ Standard [depr.c.headers] section. This check replaces C standard library headers with their C++ alternatives and removes redundant ones. -Improtant note: the Standard doesn't guarantee that the C++ headers declare all +Important note: the Standard doesn't guarantee that the C++ headers declare all the same functions in the global namespace. The check in its current form can break the code that uses library symbols from the global namespace. diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst index d20c1d8..5daa4de 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-override.rst @@ -6,9 +6,9 @@ modernize-use-override Adds ``override`` (introduced in C++11) to overridden virtual functions and removes ``virtual`` from those functions as it is not required. -``virtual`` on non base class implementations was used to help indiciate to the +``virtual`` on non base class implementations was used to help indicate to the user that a function was virtual. C++ compilers did not use the presence of -this to signify an overriden function. +this to signify an overridden function. In C++ 11 ``override`` and ``final`` keywords were introduced to allow overridden functions to be marked appropriately. Their presence allows @@ -31,7 +31,7 @@ Options If set to non-zero, this check will not diagnose ``override`` as redundant with ``final``. This is useful when code will be compiled by a compiler with - warning/error checking flags requiring ``override`` explicitly on overriden + warning/error checking flags requiring ``override`` explicitly on overridden members, such as ``gcc -Wsuggest-override``/``gcc -Werror=suggest-override``. Default is `0`. diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-algorithm.rst b/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-algorithm.rst index 7002744..fe7195b 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-algorithm.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-algorithm.rst @@ -8,7 +8,7 @@ Warns on inefficient use of STL algorithms on associative containers. Associative containers implements some of the algorithms as methods which should be preferred to the algorithms in the algorithm header. The methods -can take advanatage of the order of the elements. +can take advantage of the order of the elements. .. code-block:: c++ diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability-implicit-bool-conversion.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-implicit-bool-conversion.rst index 9c3aad8..c938d45b 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/readability-implicit-bool-conversion.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/readability-implicit-bool-conversion.rst @@ -82,7 +82,7 @@ In general, the following conversion types are checked: The rules for generating fix-it hints are: - in case of conversions from other built-in type to bool, an explicit - comparison is proposed to make it clear what exaclty is being compared: + comparison is proposed to make it clear what exactly is being compared: - ``bool boolean = floating;`` is changed to ``bool boolean = floating == 0.0f;``, diff --git a/clang-tools-extra/docs/clangd/Installation.rst b/clang-tools-extra/docs/clangd/Installation.rst index 18e1ae9..f12551d 100644 --- a/clang-tools-extra/docs/clangd/Installation.rst +++ b/clang-tools-extra/docs/clangd/Installation.rst @@ -74,7 +74,7 @@ the default ``clangd``: Most distributions include clangd in a ``clang-tools`` package, or in the full ``llvm`` distribution. -For some platforms, binaries are also avaliable at `releases.llvm.org +For some platforms, binaries are also available at `releases.llvm.org `__. :raw-html:`` diff --git a/clang-tools-extra/docs/pp-trace.rst b/clang-tools-extra/docs/pp-trace.rst index ed01ae9..b093007 100644 --- a/clang-tools-extra/docs/pp-trace.rst +++ b/clang-tools-extra/docs/pp-trace.rst @@ -423,7 +423,7 @@ Example::: `PragmaDiagnosticPush `_ Callback ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -PragmaDiagnosticPush is called when a #pragma gcc dianostic push directive is read. +PragmaDiagnosticPush is called when a #pragma gcc diagnostic push directive is read. Argument descriptions: @@ -443,7 +443,7 @@ Example::: `PragmaDiagnosticPop `_ Callback ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -PragmaDiagnosticPop is called when a #pragma gcc dianostic pop directive is read. +PragmaDiagnosticPop is called when a #pragma gcc diagnostic pop directive is read. Argument descriptions: @@ -463,7 +463,7 @@ Example::: `PragmaDiagnostic `_ Callback ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -PragmaDiagnostic is called when a #pragma gcc dianostic directive is read. +PragmaDiagnostic is called when a #pragma gcc diagnostic directive is read. Argument descriptions: -- 2.7.4