[clang-tools-extra] r265205 - [Clang-tidy] Improve checks documentation consistency.
Eugene Zelenko via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 1 18:07:19 PDT 2016
Author: eugenezelenko
Date: Fri Apr 1 20:07:18 2016
New Revision: 265205
URL: http://llvm.org/viewvc/llvm-project?rev=265205&view=rev
Log:
[Clang-tidy] Improve checks documentation consistency.
Differential revision: http://reviews.llvm.org/D18717
Modified:
clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err52-cpp.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err58-cpp.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/cert-flp30-c.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-explicit-make-pair.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-using-namespace.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-global-names-in-headers.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-braces-around-statements.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-casting.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-function-size.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-todo.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-int.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-member-string-references.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-memset.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-operator.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-assert-side-effect.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-bool-pointer-implicit-conversion.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-new-delete-overloads.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-non-copyable-objects.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-static-assert.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-suspicious-semicolon.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-unused-parameters.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-loop-convert.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-pass-by-value.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-auto.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nullptr.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-braces-around-statements.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-function-size.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-identifier-naming.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-named-parameter.rst
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err52-cpp.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err52-cpp.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err52-cpp.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err52-cpp.rst Fri Apr 1 20:07:18 2016
@@ -3,7 +3,7 @@
cert-err52-cpp
==============
-This check flags all call expressions involving setjmp() and longjmp().
+This check flags all call expressions involving ``setjmp()`` and ``longjmp()``.
This check corresponds to the CERT C++ Coding Standard rule
`ERR52-CPP. Do not use setjmp() or longjmp()
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err58-cpp.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err58-cpp.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err58-cpp.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/cert-err58-cpp.rst Fri Apr 1 20:07:18 2016
@@ -3,8 +3,8 @@
cert-err58-cpp
==============
-This check flags all static or thread_local variable declarations where the
-constructor for the object may throw an exception.
+This check flags all ``static`` or ``thread_local`` variable declarations where
+the constructor for the object may throw an exception.
This check corresponds to the CERT C++ Coding Standard rule
`ERR58-CPP. Constructors of objects with static or thread storage duration must not throw exceptions
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cert-flp30-c.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/cert-flp30-c.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/cert-flp30-c.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/cert-flp30-c.rst Fri Apr 1 20:07:18 2016
@@ -3,8 +3,8 @@
cert-flp30-c
============
-This check flags ``for`` loops where the induction expression has a floating-
-point type.
+This check flags ``for`` loops where the induction expression has a
+floating-point type.
This check corresponds to the CERT C Coding Standard rule
`FLP30-C. Do not use floating-point variables as loop counters
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst Fri Apr 1 20:07:18 2016
@@ -8,9 +8,8 @@ This check flags all array subscript exp
are out of bounds (for ``std::array``). For out-of-bounds checking of static
arrays, see the clang-diagnostic-array-bounds check.
-The check can generate fixes after the option
-``cppcoreguidelines-pro-bounds-constant-array-index.GslHeader`` has been set to
-the name of the include file that contains ``gsl::at()``, e.g. ``"gsl/gsl.h"``.
+The check can generate fixes after the option :option:`GslHeader` has been set
+to the name of the include file that contains ``gsl::at()``, e.g. `"gsl/gsl.h"`.
This rule is part of the "Bounds safety" profile of the C++ Core Guidelines, see
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Pro-bounds-arrayindex.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-explicit-make-pair.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-explicit-make-pair.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-explicit-make-pair.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-explicit-make-pair.rst Fri Apr 1 20:07:18 2016
@@ -8,4 +8,4 @@ Check that ``make_pair``'s template argu
G++ 4.6 in C++11 mode fails badly if ``make_pair``'s template arguments are
specified explicitly, and such use isn't intended in any case.
-Corresponding cpplint.py check name: 'build/explicit_make_pair'.
+Corresponding cpplint.py check name: `build/explicit_make_pair`.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst Fri Apr 1 20:07:18 2016
@@ -3,10 +3,10 @@
google-build-namespaces
=======================
-"cert-dcl59-cpp" redirects here as an alias for this check.
+`cert-dcl59-cpp` redirects here as an alias for this check.
Finds anonymous namespaces in headers.
https://google.github.io/styleguide/cppguide.html#Namespaces
-Corresponding cpplint.py check name: 'build/namespaces'.
+Corresponding cpplint.py check name: `build/namespaces`.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-using-namespace.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-using-namespace.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-using-namespace.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-using-namespace.rst Fri Apr 1 20:07:18 2016
@@ -3,8 +3,7 @@
google-build-using-namespace
============================
-
-Finds using namespace directives.
+Finds ``using namespace`` directives.
https://google.github.io/styleguide/cppguide.html#Namespaces
@@ -18,4 +17,4 @@ The check implements the following rule
// Forbidden -- This pollutes the namespace.
using namespace foo;
-Corresponding cpplint.py check name: ``build/namespaces``.
+Corresponding cpplint.py check name: `build/namespaces`.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-global-names-in-headers.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-global-names-in-headers.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-global-names-in-headers.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-global-names-in-headers.rst Fri Apr 1 20:07:18 2016
@@ -3,6 +3,5 @@
google-global-names-in-headers
==============================
-
Flag global namespace pollution in header files.
-Right now it only triggers on using declarations and directives.
+Right now it only triggers on ``using`` declarations and directives.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-braces-around-statements.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-braces-around-statements.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-braces-around-statements.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-braces-around-statements.rst Fri Apr 1 20:07:18 2016
@@ -1,31 +1,10 @@
.. title:: clang-tidy - google-readability-braces-around-statements
+.. meta::
+ :http-equiv=refresh: 5;URL=readability-braces-around-statements.html
google-readability-braces-around-statements
===========================================
-
-Checks that bodies of ``if`` statements and loops (``for``, ``range-for``,
-``do-while``, and ``while``) are inside braces
-
-Before:
-
-.. code:: c++
-
- if (condition)
- statement;
-
-After:
-
-.. code:: c++
-
- if (condition) {
- statement;
- }
-
-Additionally, one can define an option ``ShortStatementLines`` defining the
-minimal number of lines that the statement should have in order to trigger
-this check.
-
-The number of lines is counted from the end of condition or initial keyword
-(``do``/``else``) until the last line of the inner statement. Default value 0
-means that braces will be added to all statements (not having them already).
+The google-readability-braces-around-statements check is an alias, please see
+`readability-braces-around-statements <readability-braces-around-statements.html>`_
+for more information.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-casting.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-casting.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-casting.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-casting.rst Fri Apr 1 20:07:18 2016
@@ -3,13 +3,12 @@
google-readability-casting
==========================
-
Finds usages of C-style casts.
https://google.github.io/styleguide/cppguide.html#Casting
-Corresponding cpplint.py check name: 'readability/casting'.
+Corresponding cpplint.py check name: `readability/casting`.
-This check is similar to ``-Wold-style-cast``, but it suggests automated fixes
+This check is similar to `-Wold-style-cast`, but it suggests automated fixes
in some cases. The reported locations should not be different from the
-ones generated by ``-Wold-style-cast``.
+ones generated by `-Wold-style-cast`.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-function-size.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-function-size.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-function-size.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-function-size.rst Fri Apr 1 20:07:18 2016
@@ -1,17 +1,10 @@
.. title:: clang-tidy - google-readability-function-size
+.. meta::
+ :http-equiv=refresh: 5;URL=readability-function-size.html
google-readability-function-size
================================
-
-Checks for large functions based on various metrics.
-
-These options are supported:
-
- * ``LineThreshold`` - flag functions exceeding this number of lines. The
- default is ``-1`` (ignore the number of lines).
- * ``StatementThreshold`` - flag functions exceeding this number of
- statements. This may differ significantly from the number of lines for
- macro-heavy code. The default is ``800``.
- * ``BranchThreshold`` - flag functions exceeding this number of control
- statements. The default is ``-1`` (ignore the number of branches).
+The google-readability-function-size check is an alias, please see
+`readability-function-size <readability-function-size.html>`_ for more
+information.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-todo.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-todo.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-todo.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-todo.rst Fri Apr 1 20:07:18 2016
@@ -3,7 +3,6 @@
google-readability-todo
=======================
-
Finds TODO comments without a username or bug number.
-Corresponding cpplint.py check: 'readability/todo'
+Corresponding cpplint.py check: `readability/todo`
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-int.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-int.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-int.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-int.rst Fri Apr 1 20:07:18 2016
@@ -3,11 +3,10 @@
google-runtime-int
==================
-
Finds uses of ``short``, ``long`` and ``long long`` and suggest replacing them
with ``u?intXX(_t)?``.
The corresponding style guide rule:
https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Integer_Types.
-Correspondig cpplint.py check: 'runtime/int'.
+Correspondig cpplint.py check: `runtime/int`.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-member-string-references.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-member-string-references.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-member-string-references.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-member-string-references.rst Fri Apr 1 20:07:18 2016
@@ -3,7 +3,6 @@
google-runtime-member-string-references
=======================================
-
Finds members of type ``const string&``.
const string reference members are generally considered unsafe as they can
@@ -24,4 +23,4 @@ reference.
This check emit warnings for both ``std::string`` and ``::string`` const
reference members.
-Corresponding cpplint.py check name: 'runtime/member_string_reference'.
+Corresponding cpplint.py check name: `runtime/member_string_reference`.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-memset.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-memset.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-memset.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-memset.rst Fri Apr 1 20:07:18 2016
@@ -3,10 +3,8 @@
google-runtime-memset
=====================
+Finds calls to ``memset`` with a literal zero in the length argument.
-Finds calls to memset with a literal zero in the length argument.
+This is most likely unintended and the length and value arguments are swapped.
-This is most likely unintended and the length and value arguments are
-swapped.
-
-Corresponding cpplint.py check name: 'runtime/memset'.
+Corresponding cpplint.py check name: `runtime/memset`.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-operator.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-operator.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-operator.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-operator.rst Fri Apr 1 20:07:18 2016
@@ -3,9 +3,8 @@
google-runtime-operator
=======================
-
Finds overloads of unary ``operator &``.
https://google.github.io/styleguide/cppguide.html#Operator_Overloading
-Corresponding cpplint.py check name: 'runtime/operator'.
+Corresponding cpplint.py check name: `runtime/operator`.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst Fri Apr 1 20:07:18 2016
@@ -31,9 +31,9 @@ Clang-Tidy Checks
google-build-using-namespace
google-explicit-constructor
google-global-names-in-headers
- google-readability-braces-around-statements
+ google-readability-braces-around-statements (redirects to readability-braces-around-statements) <readability-braces-around-statements>
google-readability-casting
- google-readability-function-size
+ google-readability-function-size (redirects to readability-function-size) <readability-function-size>
google-readability-namespace-comments
google-readability-redundant-smartptr-get
google-readability-todo
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-assert-side-effect.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-assert-side-effect.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-assert-side-effect.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-assert-side-effect.rst Fri Apr 1 20:07:18 2016
@@ -3,7 +3,6 @@
misc-assert-side-effect
=======================
-
Finds ``assert()`` with side effect.
The condition of ``assert()`` is evaluated only in debug builds so a
@@ -12,8 +11,8 @@ builds.
There are two options:
- - ``AssertMacros``: A comma-separated list of the names of assert macros to
- be checked.
- - ``CheckFunctionCalls``: Whether to treat non-const member and non-member
- functions as they produce side effects. Disabled by default because it
- can increase the number of false positive warnings.
+ - :option:`AssertMacros`: A comma-separated list of the names of assert macros
+ to be checked.
+ - :option:`CheckFunctionCalls`: Whether to treat non-const member and
+ non-member functions as they produce side effects. Disabled by default
+ because it can increase the number of false positive warnings.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-bool-pointer-implicit-conversion.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-bool-pointer-implicit-conversion.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-bool-pointer-implicit-conversion.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-bool-pointer-implicit-conversion.rst Fri Apr 1 20:07:18 2016
@@ -3,9 +3,8 @@
misc-bool-pointer-implicit-conversion
=====================================
-
-Checks for conditions based on implicit conversion from a bool pointer to
-bool.
+Checks for conditions based on implicit conversion from a ``bool`` pointer to
+``bool``.
Example:
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-new-delete-overloads.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-new-delete-overloads.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-new-delete-overloads.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-new-delete-overloads.rst Fri Apr 1 20:07:18 2016
@@ -3,13 +3,14 @@
misc-new-delete-overloads
=========================
-"cert-dcl54-cpp" redirects here as an alias for this check.
+`cert-dcl54-cpp` redirects here as an alias for this check.
-The check flags overloaded operator new() and operator delete() functions that
-do not have a corresponding free store function defined within the same scope.
+The check flags overloaded operator ``new()`` and operator ``delete()``
+functions that do not have a corresponding free store function defined within
+the same scope.
For instance, the check will flag a class implementation of a non-placement
-operator new() when the class does not also define a non-placement operator
-delete() function as well.
+operator ``new()`` when the class does not also define a non-placement operator
+``delete()`` function as well.
The check does not flag implicitly-defined operators, deleted or private
operators, or placement operators.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-non-copyable-objects.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-non-copyable-objects.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-non-copyable-objects.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-non-copyable-objects.rst Fri Apr 1 20:07:18 2016
@@ -3,11 +3,11 @@
misc-non-copyable-objects
=========================
-"cert-fio38-c" redirects here as an alias for this check.
+`cert-fio38-c` redirects here as an alias for this check.
The check flags dereferences and non-pointer declarations of objects that are
not meant to be passed by value, such as C FILE objects or POSIX
-pthread_mutex_t objects.
+``pthread_mutex_t`` objects.
This check corresponds to CERT C++ Coding Standard rule `FIO38-C. Do not copy a FILE object
<https://www.securecoding.cert.org/confluence/display/c/FIO38-C.+Do+not+copy+a+FILE+object>`_.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-static-assert.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-static-assert.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-static-assert.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-static-assert.rst Fri Apr 1 20:07:18 2016
@@ -3,7 +3,7 @@
misc-static-assert
==================
-"cert-dcl03-c" redirects here as an alias for this check.
+`cert-dcl03-c` redirects here as an alias for this check.
Replaces ``assert()`` with ``static_assert()`` if the condition is evaluatable
at compile time.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-suspicious-semicolon.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-suspicious-semicolon.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-suspicious-semicolon.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-suspicious-semicolon.rst Fri Apr 1 20:07:18 2016
@@ -4,10 +4,10 @@ misc-suspicious-semicolon
=========================
Finds most instances of stray semicolons that unexpectedly alter the meaning of
-the code. More specifically, it looks for `if`, `while`, `for` and `for-range`
-statements whose body is a single semicolon, and then analyzes the context of
-the code (e.g. indentation) in an attempt to determine whether that is
-intentional.
+the code. More specifically, it looks for ``if``, ``while``, ``for`` and
+``for-range`` statements whose body is a single semicolon, and then analyzes the
+context of the code (e.g. indentation) in an attempt to determine whether that
+is intentional.
.. code-block:: c++
@@ -16,8 +16,8 @@ intentional.
x++;
}
-Here the body of the `if` statement consists of only the semicolon at the end of
-the first line, and `x` will be incremented regardless of the condition.
+Here the body of the ``if`` statement consists of only the semicolon at the end
+of the first line, and `x` will be incremented regardless of the condition.
.. code-block:: c++
@@ -26,7 +26,7 @@ the first line, and `x` will be incremen
processLine(line);
As a result of this code, `processLine()` will only be called once, when the
-`while` loop with the empty body exits with `line == NULL`. The indentation of
+``while`` loop with the empty body exits with `line == NULL`. The indentation of
the code indicates the intention of the programmer.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.rst Fri Apr 1 20:07:18 2016
@@ -5,7 +5,7 @@ misc-throw-by-value-catch-by-reference
"cert-err61-cpp" redirects here as an alias for this check.
-Finds violations of the rule "Throw by value, catch by reference" presented for example in "C++ Coding Standards" by H. Sutter and A. Alexandrescu. This check also has the option to find violations of the rule "Throw anonymous temporaries" (https://www.securecoding.cert.org/confluence/display/cplusplus/ERR09-CPP.+Throw+anonymous+temporaries). The option is named ``CheckThrowTemporaries`` and it's on by default.
+Finds violations of the rule "Throw by value, catch by reference" presented for example in "C++ Coding Standards" by H. Sutter and A. Alexandrescu. This check also has the option to find violations of the rule "Throw anonymous temporaries" (https://www.securecoding.cert.org/confluence/display/cplusplus/ERR09-CPP.+Throw+anonymous+temporaries). The option is named :option:`CheckThrowTemporaries` and it's on by default.
Exceptions:
* Throwing string literals will not be flagged despite being a pointer. They are not susceptible to slicing and the usage of string literals is idomatic.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-unused-parameters.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-unused-parameters.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-unused-parameters.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-unused-parameters.rst Fri Apr 1 20:07:18 2016
@@ -3,6 +3,5 @@
misc-unused-parameters
======================
-
-Finds unused parameters and fixes them, so that ``-Wunused-parameter`` can be
+Finds unused parameters and fixes them, so that `-Wunused-parameter` can be
turned on.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-loop-convert.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-loop-convert.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-loop-convert.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-loop-convert.rst Fri Apr 1 20:07:18 2016
@@ -23,7 +23,7 @@ reference to a declared expression (a va
and some part of it appears elsewhere in the loop, we lower our confidence
in the transformation due to the increased risk of changing semantics.
Transformations for these loops are marked as `risky`, and thus will only
-be converted if the minimum required confidence level is set to ``risky``.
+be converted if the minimum required confidence level is set to `risky`.
.. code-block:: c++
@@ -46,7 +46,7 @@ reasonable (Default)
If a loop calls ``.end()`` or ``.size()`` after each iteration, the
transformation for that loop is marked as `reasonable`, and thus will
-be converted if the required confidence level is set to ``reasonable``
+be converted if the required confidence level is set to `reasonable`
(default) or lower.
.. code-block:: c++
@@ -60,7 +60,7 @@ safe
Any other loops that do not match the above criteria to be marked as
`risky` or `reasonable` are marked `safe`, and thus will be converted
-if the required confidence level is set to ``safe`` or lower.
+if the required confidence level is set to `safe` or lower.
.. code-block:: c++
@@ -95,7 +95,7 @@ Original:
for (int i = 0; i < v.size(); ++i)
cout << v[i];
-After applying the check with minimum confidence level set to ``reasonable`` (default):
+After applying the check with minimum confidence level set to `reasonable` (default):
.. code-block:: c++
@@ -231,11 +231,11 @@ circumvent the analysis by accessing and
pointer or reference.
If the container were directly used instead of using the pointer or reference
-the following transformation would have only been applied at the ``risky``
+the following transformation would have only been applied at the `risky`
level since calling a member function of the container is considered `risky`.
The check cannot identify expressions associated with the container that are
different than the one used in the loop header, therefore the transformation
-below ends up being performed at the ``safe`` level.
+below ends up being performed at the `safe` level.
.. code-block:: c++
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-pass-by-value.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-pass-by-value.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-pass-by-value.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-pass-by-value.rst Fri Apr 1 20:07:18 2016
@@ -35,7 +35,7 @@ Pass-by-value in constructors
Replaces the uses of const-references constructor parameters that are copied
into class fields. The parameter is then moved with `std::move()`.
-Since `std::move()` is a library function declared in `<utility>` it may be
+Since ``std::move()`` is a library function declared in `<utility>` it may be
necessary to add this include. The check will add the include directive when
necessary.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-auto.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-auto.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-auto.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-auto.rst Fri Apr 1 20:07:18 2016
@@ -108,7 +108,7 @@ conditions are satisfied:
* The initializer for the variable being declared is not a braced initializer
list. Otherwise, use of ``auto`` would cause the type of the variable to be
- deduced as``std::initializer_list``.
+ deduced as ``std::initializer_list``.
New expressions
---------------
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nullptr.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nullptr.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nullptr.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nullptr.rst Fri Apr 1 20:07:18 2016
@@ -42,7 +42,7 @@ User defined macros
By default this check will only replace the ``NULL`` macro and will skip any
user-defined macros that behaves like ``NULL``. The user can use the
-:option:``UserNullMacros`` option to specify a comma-separated list of macro
+:option:`UserNullMacros` option to specify a comma-separated list of macro
names that will be transformed along with ``NULL``.
Example
@@ -64,4 +64,4 @@ transforms to:
int *p = nullptr;
}
-if the ``UserNullMacros`` option is set to ``MY_NULL``.
+if the :option:`UserNullMacros` option is set to ``MY_NULL``.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/performance-implicit-cast-in-loop.rst Fri Apr 1 20:07:18 2016
@@ -16,5 +16,5 @@ Example:
// The iterator type is in fact pair<const int, vector<string>>, which means
// that the compiler added a cast, resulting in a copy of the vectors.
-The easiest solution is usually to use "const auto&" instead of writing the type
+The easiest solution is usually to use ``const auto&`` instead of writing the type
manually.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-braces-around-statements.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-braces-around-statements.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/readability-braces-around-statements.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/readability-braces-around-statements.rst Fri Apr 1 20:07:18 2016
@@ -3,6 +3,8 @@
readability-braces-around-statements
====================================
+`google-readability-braces-around-statements` redirects here as an alias for
+this check.
Checks that bodies of ``if`` statements and loops (``for``, ``range-for``,
``do-while``, and ``while``) are inside braces
@@ -22,8 +24,8 @@ After:
statement;
}
-Additionally, one can define an option ``ShortStatementLines`` defining the
-minimal number of lines that the statement should have in order to trigger
+Additionally, one can define an option :option:`ShortStatementLines` defining
+the minimal number of lines that the statement should have in order to trigger
this check.
The number of lines is counted from the end of condition or initial keyword
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-function-size.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-function-size.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/readability-function-size.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/readability-function-size.rst Fri Apr 1 20:07:18 2016
@@ -3,15 +3,16 @@
readability-function-size
=========================
+`google-readability-function-size` redirects here as an alias for this check.
Checks for large functions based on various metrics.
These options are supported:
- * ``LineThreshold`` - flag functions exceeding this number of lines. The
- default is ``-1`` (ignore the number of lines).
- * ``StatementThreshold`` - flag functions exceeding this number of
+ * :option:`LineThreshold` - flag functions exceeding this number of lines. The
+ default is `-1` (ignore the number of lines).
+ * :option:`StatementThreshold` - flag functions exceeding this number of
statements. This may differ significantly from the number of lines for
- macro-heavy code. The default is ``800``.
- * ``BranchThreshold`` - flag functions exceeding this number of control
- statements. The default is ``-1`` (ignore the number of branches).
+ macro-heavy code. The default is `800`.
+ * :option:`BranchThreshold` - flag functions exceeding this number of control
+ statements. The default is `-1` (ignore the number of branches).
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-identifier-naming.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-identifier-naming.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/readability-identifier-naming.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/readability-identifier-naming.rst Fri Apr 1 20:07:18 2016
@@ -3,12 +3,11 @@
readability-identifier-naming
=============================
-
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 tries to convert from one to another if a mismatch is detected.
+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.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-named-parameter.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-named-parameter.rst?rev=265205&r1=265204&r2=265205&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/readability-named-parameter.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/readability-named-parameter.rst Fri Apr 1 20:07:18 2016
@@ -3,7 +3,6 @@
readability-named-parameter
===========================
-
Find functions with unnamed arguments.
The check implements the following rule originating in the Google C++ Style
@@ -14,4 +13,4 @@ https://google.github.io/styleguide/cppg
All parameters should be named, with identical names in the declaration and
implementation.
-Corresponding cpplint.py check name: 'readability/function'.
+Corresponding cpplint.py check name: `readability/function`.
More information about the cfe-commits
mailing list