Index: docs/clang-tidy/checks/readability-const-return-type.rst =================================================================== --- docs/clang-tidy/checks/readability-const-return-type.rst +++ docs/clang-tidy/checks/readability-const-return-type.rst @@ -5,13 +5,13 @@ Checks for functions with a ``const``-qualified return type and recommends removal of the ``const`` keyword. Such use of `const` is usually superfluous, -and can prevent valuable compiler optimizations. Does not (yet) fix trailing +and can prevent valuable compiler optimizations. Does not (yet) fix trailing return types. Examples: .. code-block:: c++ - + const int foo(); const Clazz foo(); Clazz *const foo(); Index: docs/clang-tidy/checks/readability-container-size-empty.rst =================================================================== --- docs/clang-tidy/checks/readability-container-size-empty.rst +++ docs/clang-tidy/checks/readability-container-size-empty.rst @@ -3,7 +3,6 @@ readability-container-size-empty ================================ - Checks whether a call to the ``size()`` method can be replaced with a call to ``empty()``. Index: docs/clang-tidy/checks/readability-delete-null-pointer.rst =================================================================== --- docs/clang-tidy/checks/readability-delete-null-pointer.rst +++ docs/clang-tidy/checks/readability-delete-null-pointer.rst @@ -3,8 +3,9 @@ readability-delete-null-pointer =============================== -Checks the ``if`` statements where a pointer's existence is checked and then deletes the pointer. -The check is unnecessary as deleting a null pointer has no effect. +Checks the ``if`` statements where a pointer's existence is checked and then +deletes the pointer. The check is unnecessary as deleting a null pointer has no +effect. .. code:: c++ Index: docs/clang-tidy/checks/readability-else-after-return.rst =================================================================== --- docs/clang-tidy/checks/readability-else-after-return.rst +++ docs/clang-tidy/checks/readability-else-after-return.rst @@ -35,7 +35,6 @@ } } - Would be transformed into: .. code-block:: c++ @@ -59,6 +58,5 @@ } } - This check helps to enforce this `LLVM Coding Standards recommendation `_. Index: docs/clang-tidy/checks/readability-identifier-naming.rst =================================================================== --- docs/clang-tidy/checks/readability-identifier-naming.rst +++ docs/clang-tidy/checks/readability-identifier-naming.rst @@ -5,14 +5,13 @@ Checks for identifiers naming style mismatch. -This check will try to enforce coding guidelines on the identifiers naming. -It supports `lower_case`, `UPPER_CASE`, `camelBack` and `CamelCase` casing and +This check will try to enforce coding guidelines on the identifiers naming. It +supports `lower_case`, `UPPER_CASE`, `camelBack` and `CamelCase` casing and tries to convert from one to another if a mismatch is detected. -It also supports a fixed prefix and suffix that will be prepended or -appended to the identifiers, regardless of the casing. +It also supports a fixed prefix and suffix that will be prepended or appended +to the identifiers, regardless of the casing. Many configuration options are available, in order to be able to create -different rules for different kind of identifier. In general, the -rules are falling back to a more generic rule if the specific case is not -configured. +different rules for different kind of identifier. In general, the rules are +falling back to a more generic rule if the specific case is not configured. Index: docs/clang-tidy/checks/readability-implicit-bool-conversion.rst =================================================================== --- docs/clang-tidy/checks/readability-implicit-bool-conversion.rst +++ docs/clang-tidy/checks/readability-implicit-bool-conversion.rst @@ -4,9 +4,9 @@ ==================================== This check can be used to find implicit conversions between built-in types and -booleans. Depending on use case, it may simply help with readability of the code, -or in some cases, point to potential bugs which remain unnoticed due to implicit -conversions. +booleans. Depending on use case, it may simply help with readability of the +code, or in some cases, point to potential bugs which remain unnoticed due to +implicit conversions. The following is a real-world example of bug which was hiding behind implicit ``bool`` conversion: Index: docs/clang-tidy/checks/readability-isolate-declaration.rst =================================================================== --- docs/clang-tidy/checks/readability-isolate-declaration.rst +++ docs/clang-tidy/checks/readability-isolate-declaration.rst @@ -3,12 +3,12 @@ readability-isolate-declaration =============================== -Detects local variable declarations declaring more than one variable and -tries to refactor the code to one statement per declaration. +Detects local variable declarations declaring more than one variable and tries +to refactor the code to one statement per declaration. The automatic code-transformation will use the same indentation as the original -for every created statement and add a line break after each statement. -It keeps the order of the variable declarations consistent, too. +for every created statement and add a line break after each statement. It keeps +the order of the variable declarations consistent, too. .. code-block:: c++ @@ -20,7 +20,6 @@ // int * const const_ptr = &value; } - The check excludes places where it is necessary or common to declare multiple variables in one statement and there is no other way supported in the language. Please note that structured bindings are not considered. @@ -39,7 +38,6 @@ if (SomeCondition()) int i = 42, j = 43, k = function(i,j); - Limitations ----------- Index: docs/clang-tidy/checks/readability-magic-numbers.rst =================================================================== --- docs/clang-tidy/checks/readability-magic-numbers.rst +++ docs/clang-tidy/checks/readability-magic-numbers.rst @@ -19,7 +19,6 @@ Weiss, Bombardier * http://wiki.c2.com/?MagicNumber - Examples of magic values: .. code-block:: c++ @@ -110,4 +109,3 @@ Boolean value indicating whether to accept all floating point values without warning. Default value is `false`. - Index: docs/clang-tidy/checks/readability-misleading-indentation.rst =================================================================== --- docs/clang-tidy/checks/readability-misleading-indentation.rst +++ docs/clang-tidy/checks/readability-misleading-indentation.rst @@ -4,12 +4,12 @@ ================================== Correct indentation helps to understand code. Mismatch of the syntactical -structure and the indentation of the code may hide serious problems. -Missing braces can also make it significantly harder to read the code, -therefore it is important to use braces. +structure and the indentation of the code may hide serious problems. Missing +braces can also make it significantly harder to read the code, therefore it is +important to use braces. -The way to avoid dangling else is to always check that an ``else`` belongs -to the ``if`` that begins in the same column. +The way to avoid dangling else is to always check that an ``else`` belongs to +the ``if`` that begins in the same column. You can omit braces when your inner part of e.g. an ``if`` statement has only one statement in it. Although in that case you should begin the next statement Index: docs/clang-tidy/checks/readability-misplaced-array-index.rst =================================================================== --- docs/clang-tidy/checks/readability-misplaced-array-index.rst +++ docs/clang-tidy/checks/readability-misplaced-array-index.rst @@ -24,4 +24,3 @@ The check warns about such unusual syntax for readability reasons: * There are programmers that are not familiar with this unusual syntax. * It is possible that variables are mixed up. - Index: docs/clang-tidy/checks/readability-redundant-smartptr-get.rst =================================================================== --- docs/clang-tidy/checks/readability-redundant-smartptr-get.rst +++ docs/clang-tidy/checks/readability-redundant-smartptr-get.rst @@ -14,7 +14,6 @@ *ptr->get() ==> **ptr if (ptr.get() == nullptr) ... => if (ptr == nullptr) ... - .. option:: IgnoreMacros If this option is set to non-zero (default is `1`), the check will not warn Index: docs/clang-tidy/checks/readability-redundant-string-cstr.rst =================================================================== --- docs/clang-tidy/checks/readability-redundant-string-cstr.rst +++ docs/clang-tidy/checks/readability-redundant-string-cstr.rst @@ -3,5 +3,4 @@ readability-redundant-string-cstr ================================= - Finds unnecessary calls to ``std::string::c_str()`` and ``std::string::data()``. Index: docs/clang-tidy/checks/readability-simplify-boolean-expr.rst =================================================================== --- docs/clang-tidy/checks/readability-simplify-boolean-expr.rst +++ docs/clang-tidy/checks/readability-simplify-boolean-expr.rst @@ -3,8 +3,8 @@ readability-simplify-boolean-expr ================================= -Looks for boolean expressions involving boolean constants and simplifies -them to use the appropriate boolean expression directly. +Looks for boolean expressions involving boolean constants and simplifies them +to use the appropriate boolean expression directly. Examples: Index: docs/clang-tidy/checks/readability-static-accessed-through-instance.rst =================================================================== --- docs/clang-tidy/checks/readability-static-accessed-through-instance.rst +++ docs/clang-tidy/checks/readability-static-accessed-through-instance.rst @@ -28,4 +28,3 @@ C *c1 = new C(); C::foo(); C::x; - Index: docs/clang-tidy/checks/readability-string-compare.rst =================================================================== --- docs/clang-tidy/checks/readability-string-compare.rst +++ docs/clang-tidy/checks/readability-string-compare.rst @@ -5,14 +5,14 @@ Finds string comparisons using the compare method. -A common mistake is to use the string's ``compare`` method instead of using the +A common mistake is to use the string's ``compare`` method instead of using the equality or inequality operators. The compare method is intended for sorting -functions and thus returns a negative number, a positive number or -zero depending on the lexicographical relationship between the strings compared. -If an equality or inequality check can suffice, that is recommended. This is +functions and thus returns a negative number, a positive number or zero +depending on the lexicographical relationship between the strings compared. If +an equality or inequality check can suffice, that is recommended. This is recommended to avoid the risk of incorrect interpretation of the return value -and to simplify the code. The string equality and inequality operators can -also be faster than the ``compare`` method due to early termination. +and to simplify the code. The string equality and inequality operators can also +be faster than the ``compare`` method due to early termination. Examples: @@ -50,5 +50,5 @@ } The above code examples shows the list of if-statements that this check will -give a warning for. All of them uses ``compare`` to check if equality or +give a warning for. All of them uses ``compare`` to check if equality or inequality of two strings instead of using the correct operators. Index: docs/clang-tidy/checks/readability-uniqueptr-delete-release.rst =================================================================== --- docs/clang-tidy/checks/readability-uniqueptr-delete-release.rst +++ docs/clang-tidy/checks/readability-uniqueptr-delete-release.rst @@ -3,8 +3,8 @@ readability-uniqueptr-delete-release ==================================== -Replace ``delete .release()`` with `` = nullptr``. -The latter is shorter, simpler and does not require use of raw pointer APIs. +Replace ``delete .release()`` with `` = nullptr``. The +latter is shorter, simpler and does not require use of raw pointer APIs. .. code-block:: c++ Index: docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst =================================================================== --- docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst +++ docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst @@ -3,9 +3,9 @@ readability-uppercase-literal-suffix ==================================== -`cert-dcl16-c` redirects here as an alias for this check. -By default, only the suffixes that begin with ``l`` (``l``, ``ll``, ``lu``, -``llu``, but not ``u``, ``ul``, ``ull``) are diagnosed by that alias. +`cert-dcl16-c` redirects here as an alias for this check. By default, only the +suffixes that begin with ``l`` (``l``, ``ll``, ``lu``, ``llu``, but not ``u``, +``ul``, ``ull``) are diagnosed by that alias. `hicpp-uppercase-literal-suffix` redirects here as an alias for this check. Index: docs/clang-tidy/checks/zircon-temporary-objects.rst =================================================================== --- docs/clang-tidy/checks/zircon-temporary-objects.rst +++ docs/clang-tidy/checks/zircon-temporary-objects.rst @@ -3,12 +3,12 @@ zircon-temporary-objects ======================== -Warns on construction of specific temporary objects in the Zircon kernel. -If the object should be flagged, If the object should be flagged, the fully +Warns on construction of specific temporary objects in the Zircon kernel. If +the object should be flagged, If the object should be flagged, the fully qualified type name must be explicitly passed to the check. -For example, given the list of classes "Foo" and "NS::Bar", all of the -following will trigger the warning: +For example, given the list of classes "Foo" and "NS::Bar", all of the +following will trigger the warning: .. code-block:: c++ @@ -33,8 +33,8 @@ Bar(); // Not NS::Bar, so okay NS::Bar B; // Non-temporary construction okay -Note that objects must be explicitly specified in order to be flagged, -and so objects that inherit a specified object will not be flagged. +Note that objects must be explicitly specified in order to be flagged, and so +objects that inherit a specified object will not be flagged. This check matches temporary objects without regard for inheritance and so a prohibited base class type does not similarly prohibit derived class types. @@ -49,5 +49,5 @@ .. option:: Names - A semi-colon-separated list of fully-qualified names of C++ classes that + A semi-colon-separated list of fully-qualified names of C++ classes that should not be constructed as temporaries. Default is empty.