forked from OSchip/llvm-project
[clang-tidy docs] Fix build errors on Sphinx 1.4.6
llvm-svn: 280095
This commit is contained in:
parent
39dc744f19
commit
2c5ee4454d
|
@ -17,7 +17,7 @@ Checks for calls with implicit comparator and proposed to explicitly add it.
|
|||
Checks that compare function results (i,e, ``strcmp``) are compared to valid
|
||||
constant. The resulting value is
|
||||
|
||||
.. code-block::
|
||||
.. code::
|
||||
|
||||
< 0 when lower than,
|
||||
> 0 when greater than,
|
||||
|
|
|
@ -82,10 +82,10 @@ The rules for generating fix-it hints are:
|
|||
is proposed to make it clear what exaclty is being compared:
|
||||
|
||||
- ``bool boolean = floating;`` is changed to
|
||||
``bool boolean = floating == 0.0f;``,
|
||||
``bool boolean = floating == 0.0f;``,
|
||||
|
||||
- for other types, appropriate literals are used (``0``, ``0u``, ``0.0f``,
|
||||
``0.0``, ``nullptr``),
|
||||
``0.0``, ``nullptr``),
|
||||
|
||||
- in case of negated expressions cast to bool, the proposed replacement with
|
||||
comparison is simplified:
|
||||
|
@ -96,7 +96,7 @@ The rules for generating fix-it hints are:
|
|||
is proposed to make it clear that a cast is taking place:
|
||||
|
||||
- ``int integer = boolean;`` is changed to
|
||||
``int integer = static_cast<int>(boolean);``,
|
||||
``int integer = static_cast<int>(boolean);``,
|
||||
|
||||
- if the cast is performed on type literals, an equivalent literal is proposed,
|
||||
according to what type is actually expected, for example:
|
||||
|
|
Loading…
Reference in New Issue