[Clang-tidy documentation] Consistency (fix-it); 80 characters per line.

llvm-svn: 293234
This commit is contained in:
Eugene Zelenko 2017-01-26 23:58:21 +00:00
parent 00dd7172b5
commit 834bb0e3b5
4 changed files with 14 additions and 16 deletions

View File

@ -9,8 +9,8 @@ of an appropriate RAII object.
See `C++ Core Guidelines See `C++ Core Guidelines
<https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rr-mallocfree>`. <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rr-mallocfree>`.
There is no attempt made to provide fixit hints, since manual resource management isn't There is no attempt made to provide fix-it hints, since manual resource
easily transformed automatically into RAII. management isn't easily transformed automatically into RAII.
.. code-block:: c++ .. code-block:: c++

View File

@ -4,7 +4,7 @@ cppcoreguidelines-pro-type-static-cast-downcast
=============================================== ===============================================
This check flags all usages of ``static_cast``, where a base class is casted to This check flags all usages of ``static_cast``, where a base class is casted to
a derived class. In those cases, a fixit is provided to convert the cast to a a derived class. In those cases, a fix-it is provided to convert the cast to a
``dynamic_cast``. ``dynamic_cast``.
Use of these casts can violate type safety and cause the program to access a Use of these casts can violate type safety and cause the program to access a

View File

@ -29,11 +29,10 @@ Options
.. option:: ReplacementString .. option:: ReplacementString
Users can use :option:`ReplacementString` to specify a macro to use Users can use :option:`ReplacementString` to specify a macro to use instead of
instead of ``noexcept``. This is useful when maintaining source code ``noexcept``. This is useful when maintaining source code that uses custom
that uses custom exception specification marking other than exception specification marking other than ``noexcept``. Fix-it hints will only
``noexcept``. Fixit hints will only be generated for non-throwing be generated for non-throwing specifications.
specifications.
Example Example
^^^^^^^ ^^^^^^^
@ -47,18 +46,17 @@ transforms to:
.. code-block:: c++ .. code-block:: c++
void bar() throw(int); // No Fixit generated. void bar() throw(int); // No fix-it generated.
void foo() NOEXCEPT; void foo() NOEXCEPT;
if the :option:`ReplacementString` option is set to `NOEXCEPT`. if the :option:`ReplacementString` option is set to `NOEXCEPT`.
.. option:: UseNoexceptFalse .. option:: UseNoexceptFalse
Enabled by default, disabling will generate Fixit hints that remove Enabled by default, disabling will generate fix-it hints that remove throwing
throwing dynamic exception specs, e.g., ``throw(<something>)``, dynamic exception specs, e.g., ``throw(<something>)``, completely without
completely without providing a replacement text, except for providing a replacement text, except for destructors and delete operators that
destructors and delete operators that are ``noexcept(true)`` by are ``noexcept(true)`` by default.
default.
Example Example
^^^^^^^ ^^^^^^^

View File

@ -549,9 +549,9 @@ file, runs :program:`clang-tidy` and verifies messages and fixes with two
separate `FileCheck`_ invocations: once with FileCheck's directive separate `FileCheck`_ invocations: once with FileCheck's directive
prefix set to ``CHECK-MESSAGES``, validating the diagnostic messages, prefix set to ``CHECK-MESSAGES``, validating the diagnostic messages,
and once with the directive prefix set to ``CHECK-FIXES``, running and once with the directive prefix set to ``CHECK-FIXES``, running
against the fixed code (i.e., the code after generated fixits are against the fixed code (i.e., the code after generated fix-its are
applied). In particular, ``CHECK-FIXES:`` can be used to check applied). In particular, ``CHECK-FIXES:`` can be used to check
that code was not modified by fixits, by checking that it is present that code was not modified by fix-its, by checking that it is present
unchanged in the fixed code. The full set of `FileCheck`_ directives unchanged in the fixed code. The full set of `FileCheck`_ directives
is available (e.g., ``CHECK-MESSAGES-SAME:``, ``CHECK-MESSAGES-NOT:``), though is available (e.g., ``CHECK-MESSAGES-SAME:``, ``CHECK-MESSAGES-NOT:``), though
typically the basic ``CHECK`` forms (``CHECK-MESSAGES`` and ``CHECK-FIXES``) typically the basic ``CHECK`` forms (``CHECK-MESSAGES`` and ``CHECK-FIXES``)