mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-01 14:58:18 +00:00
[clang-tidy] Fix documentation typos (NFC)
This commit is contained in:
parent
a4cb5aefd5
commit
d8afa5777b
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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++
|
||||
|
@ -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" (``&&``)
|
||||
|
@ -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``
|
||||
|
@ -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:
|
||||
|
@ -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).
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
<http://www.codingstandard.com/section/7-5-the-asm-declaration/>`_
|
||||
as it restricts the portability of code.
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user