[clang-tools-extra] r248151 - [clang-tidy] Fixed formatting of headings in the docs.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 21 05:13:27 PDT 2015


Author: alexfh
Date: Mon Sep 21 07:13:27 2015
New Revision: 248151

URL: http://llvm.org/viewvc/llvm-project?rev=248151&view=rev
Log:
[clang-tidy] Fixed formatting of headings in the docs.

Modified:
    clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-loop-convert.rst
    clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-replace-auto-ptr.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

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=248151&r1=248150&r2=248151&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 Mon Sep 21 07:13:27 2015
@@ -11,10 +11,10 @@ Three kinds of loops can be converted:
 -  Loops over array-like containers, using ``operator[]`` and ``at()``.
 
 MinConfidence option
-====================
+--------------------
 
 risky
------
+^^^^^
 
 In loops where the container expression is more complex than just a
 reference to a declared expression (a variable, function, enum, etc.),
@@ -40,7 +40,7 @@ for an example of an incorrect transform
 level is set to `risky`.
 
 reasonable (Default)
---------------------
+^^^^^^^^^^^^^^^^^^^^
 
 If a loop calls ``.end()`` or ``.size()`` after each iteration, the
 transformation for that loop is marked as `reasonable`, and thus will
@@ -54,7 +54,7 @@ be converted if the required confidence
     cout << container[i];
 
 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
@@ -68,7 +68,7 @@ if the required confidence level is set
     cout << arr[i];
 
 Example
-=======
+-------
 
 Original:
 
@@ -117,7 +117,7 @@ After transformation with confidence lev
     cout << elem;
 
 Limitations
-===========
+-----------
 
 There are certain situations where the tool may erroneously perform
 transformations that remove information and change semantics. Users of the tool
@@ -125,7 +125,7 @@ should be aware of the behaviour and lim
 the cases below.
 
 Comments inside loop headers
-----------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Comments inside the original loop header are ignored and deleted when
 transformed.
@@ -135,7 +135,7 @@ transformed.
   for (int i = 0; i < N; /* This will be deleted */ ++i) { }
 
 Range-based loops evaluate end() only once
-------------------------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 The C++11 range-based for loop calls ``.end()`` only once during the
 initialization of the loop. If in the original loop ``.end()`` is called after
@@ -201,7 +201,7 @@ transformed loop if ``.end()`` was origi
   }
 
 Overloaded operator->() with side effects
------------------------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Similarly, if ``operator->()`` was overloaded to have side effects, such as
 logging, the semantics will change. If the iterator's ``operator->()`` was used
@@ -221,7 +221,7 @@ performed.
   }
 
 Pointers and references to containers
--------------------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 While most of the transform's risk analysis is dedicated to determining whether
 the iterator or container was modified within the loop, it is possible to

Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-replace-auto-ptr.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-replace-auto-ptr.rst?rev=248151&r1=248150&r2=248151&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-replace-auto-ptr.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-replace-auto-ptr.rst Mon Sep 21 07:13:27 2015
@@ -25,12 +25,12 @@ Migration example:
   +  take_ownership_fn(std::move(b));
    }
 
-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 transform will add the include directive when
 necessary.
 
 Known Limitations
-=================
+-----------------
 * If headers modification is not activated or if a header is not allowed to be
   changed this transform will produce broken code (compilation error), where the
   the headers' code will stay unchanged while the code using them will be

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=248151&r1=248150&r2=248151&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 Mon Sep 21 07:13:27 2015
@@ -34,7 +34,7 @@ and maintainability. As a result, ``auto
 situations described below.
 
 Iterators
-=========
+---------
 
 Iterator type specifiers tend to be long and used frequently, especially in
 loop constructs. Since the functions generating iterators have a common format,
@@ -127,7 +127,7 @@ following conditions are satisfied:
   deduced as``std::initializer_list``.
 
 Known Limitations
-=================
+-----------------
 * If the initializer is an explicit conversion constructor, the transform will
   not replace the type specifier even though it would be safe to do so.
 * User-defined iterators are not handled at this time.

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=248151&r1=248150&r2=248151&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 Mon Sep 21 07:13:27 2015
@@ -5,7 +5,7 @@ The check converts the usage of null poi
 to use the new C++11 ``nullptr`` keyword.
 
 Example
-=======
+-------
 
 .. code-block:: c++
 
@@ -36,7 +36,7 @@ transforms to:
 
 
 User defined macros
-===================
+-------------------
 
 By default this transform will only replace the ``NULL`` macro and will skip any
 user-defined macros that behaves like ``NULL``. The user can use the
@@ -44,7 +44,7 @@ user-defined macros that behaves like ``
 names that will be transformed along with ``NULL``.
 
 Example
--------
+^^^^^^^
 
 .. code-block:: c++
 
@@ -62,4 +62,4 @@ transforms to:
     int *p = nullptr;
   }
 
-  if the ``UserNullMacros`` option is set to ``MY_NULL``.
+if the ``UserNullMacros`` option is set to ``MY_NULL``.




More information about the cfe-commits mailing list