[clang-tools-extra] r279049 - [clang-tidy docs] Fix build errors on Sphinx 1.4.5

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 18 04:06:10 PDT 2016


Author: alexfh
Date: Thu Aug 18 06:06:09 2016
New Revision: 279049

URL: http://llvm.org/viewvc/llvm-project?rev=279049&view=rev
Log:
[clang-tidy docs] Fix build errors on Sphinx 1.4.5

Modified:
    clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst
    clang-tools-extra/trunk/docs/clang-tidy/checks/misc-assert-side-effect.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/modernize-use-nullptr.rst
    clang-tools-extra/trunk/docs/clang-tidy/checks/mpi-buffer-deref.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/index.rst

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=279049&r1=279048&r2=279049&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 Thu Aug 18 06:06:09 2016
@@ -8,7 +8,7 @@ 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 :option:`GslHeader` has been set
+The check can generate fixes after the 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

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=279049&r1=279048&r2=279049&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 Thu Aug 18 06:06:09 2016
@@ -11,8 +11,12 @@ builds.
 
 There are two options:
 
-  - :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.
+.. 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-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=279049&r1=279048&r2=279049&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 Thu Aug 18 06:06:09 2016
@@ -5,11 +5,29 @@ 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 :option:`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.
 
 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.
-  * Catching character pointers (``char``, ``wchar_t``, unicode character types) will not be flagged to allow catching sting literals.
-  * Moved named values will not be flagged as not throwing an anonymous temporary. In this case we can be sure that the user knows that the object can't be accessed outside catch blocks handling the error.
-  * Throwing function parameters will not be flagged as not throwing an anonymous temporary. This allows helper functions for throwing.
-  * Re-throwing caught exception variables will not be flragged as not throwing an anonymous temporary. Although this can usually be done by just writing ``throw;`` it happens often enough in real code.
+  * 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.
+  * Catching character pointers (``char``, ``wchar_t``, unicode character types)
+    will not be flagged to allow catching sting literals.
+  * Moved named values will not be flagged as not throwing an anonymous
+    temporary. In this case we can be sure that the user knows that the object
+    can't be accessed outside catch blocks handling the error.
+  * Throwing function parameters will not be flagged as not throwing an
+    anonymous temporary. This allows helper functions for throwing.
+  * Re-throwing caught exception variables will not be flragged as not throwing
+    an anonymous temporary. Although this can usually be done by just writing
+    ``throw;`` it happens often enough in real code.
+
+Options
+-------
+
+.. option:: CheckThrowTemporaries
+
+   Triggers detection of violations of the rule `Throw anonymous temporaries
+   <https://www.securecoding.cert.org/confluence/display/cplusplus/ERR09-CPP.+Throw+anonymous+temporaries>`_.
+   Default is `1`.
+

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=279049&r1=279048&r2=279049&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 Thu Aug 18 06:06:09 2016
@@ -36,14 +36,15 @@ transforms to:
     return nullptr;
   }
 
+Options
+-------
 
-User defined macros
--------------------
+.. option:: UserNullMacros
 
-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
-names that will be transformed along with ``NULL``.
+   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
+   names that will be transformed along with ``NULL``.
 
 Example
 ^^^^^^^

Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/mpi-buffer-deref.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/mpi-buffer-deref.rst?rev=279049&r1=279048&r2=279049&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/mpi-buffer-deref.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/mpi-buffer-deref.rst Thu Aug 18 06:06:09 2016
@@ -10,16 +10,17 @@ types, insufficiently dereferenced buffe
 double pointers or multidimensional arrays, without a compiler warning emitted.
 
 Examples:
-.. code:: c++
 
-  // A double pointer is passed to the MPI function.
-  char *buf;
-  MPI_Send(&buf, 1, MPI_CHAR, 0, 0, MPI_COMM_WORLD);
+.. code-block:: c++
 
-  // A multidimensional array is passed to the MPI function.
-  short buf[1][1];
-  MPI_Send(buf, 1, MPI_SHORT, 0, 0, MPI_COMM_WORLD);
+   // A double pointer is passed to the MPI function.
+   char *buf;
+   MPI_Send(&buf, 1, MPI_CHAR, 0, 0, MPI_COMM_WORLD);
 
-  // A pointer to an array is passed to the MPI function.
-  short *buf[1];
-  MPI_Send(buf, 1, MPI_SHORT, 0, 0, MPI_COMM_WORLD);
+   // A multidimensional array is passed to the MPI function.
+   short buf[1][1];
+   MPI_Send(buf, 1, MPI_SHORT, 0, 0, MPI_COMM_WORLD);
+
+   // A pointer to an array is passed to the MPI function.
+   short *buf[1];
+   MPI_Send(buf, 1, MPI_SHORT, 0, 0, MPI_COMM_WORLD);

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=279049&r1=279048&r2=279049&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 Thu Aug 18 06:06:09 2016
@@ -6,8 +6,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
+Checks that bodies of ``if`` statements and loops (``for``, ``do while``, and
+``while``) are inside braces.
 
 Before:
 
@@ -24,10 +24,15 @@ After:
     statement;
   }
 
-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.
+Options
+-------
+
+.. option:: ShortStatementLines
+
+   Defines 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 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).

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=279049&r1=279048&r2=279049&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 Thu Aug 18 06:06:09 2016
@@ -7,12 +7,21 @@ readability-function-size
 
 Checks for large functions based on various metrics.
 
-These options are supported:
+Options
+-------
 
-  * :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`.
-  * :option:`BranchThreshold` - flag functions exceeding this number of control
-    statements. The default is `-1` (ignore the number of branches).
+.. 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`.
+
+.. 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/index.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/index.rst?rev=279049&r1=279048&r2=279049&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/index.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/index.rst Thu Aug 18 06:06:09 2016
@@ -48,7 +48,7 @@ The ``-list-checks`` option lists all th
 available checks or with any other value of ``-checks=`` to see which checks are
 enabled by this value.
 
-:: _checks-groups-table:
+.. _checks-groups-table:
 
 There are currently the following groups of checks:
 
@@ -341,8 +341,8 @@ style used in the project. For code revi
 .. _LLVM Phabricator: http://llvm.org/docs/Phabricator.html
 
 Next, you need to decide which module the check belongs to. Modules
-are located in subdirectories of
-``clang-tidy/ <http://reviews.llvm.org/diffusion/L/browse/clang-tools-extra/trunk/clang-tidy/>``_
+are located in subdirectories of `clang-tidy/
+<http://reviews.llvm.org/diffusion/L/browse/clang-tools-extra/trunk/clang-tidy/>`_
 and contain checks targeting a certain aspect of code quality (performance,
 readability, etc.), certain coding style or standard (Google, LLVM, CERT, etc.)
 or a widely used API (e.g. MPI). Their names are same as user-facing check




More information about the cfe-commits mailing list