summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/docs/LoopConvertTransform.rst
diff options
context:
space:
mode:
authorEdwin Vane <edwin.vane@intel.com>2013-06-14 15:14:20 +0000
committerEdwin Vane <edwin.vane@intel.com>2013-06-14 15:14:20 +0000
commit8d28646db6ca328b2e33fee74d1aebee0f5a6966 (patch)
tree940d879bd751a2e281985dbcc1ba33654e293337 /clang-tools-extra/docs/LoopConvertTransform.rst
parentb786304fea49d01084b50e325847792ef10091f4 (diff)
downloadbcm5719-llvm-8d28646db6ca328b2e33fee74d1aebee0f5a6966.tar.gz
bcm5719-llvm-8d28646db6ca328b2e33fee74d1aebee0f5a6966.zip
cpp11-migrate: Fixing section markup
Adhering to LLVM's ReST style for section markup. llvm-svn: 183981
Diffstat (limited to 'clang-tools-extra/docs/LoopConvertTransform.rst')
-rw-r--r--clang-tools-extra/docs/LoopConvertTransform.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang-tools-extra/docs/LoopConvertTransform.rst b/clang-tools-extra/docs/LoopConvertTransform.rst
index e6f877d7405..1579d6b77b3 100644
--- a/clang-tools-extra/docs/LoopConvertTransform.rst
+++ b/clang-tools-extra/docs/LoopConvertTransform.rst
@@ -18,7 +18,7 @@ Risk
====
Risky
-^^^^^
+-----
In loops where the container expression is more complex than just a
reference to a declared expression (a variable, function, enum, etc.),
@@ -44,7 +44,7 @@ for an example of an incorrect transformation when the maximum acceptable risk
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
@@ -58,7 +58,7 @@ be converted if the acceptable risk level is set to ``-risk=reasonable``
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
@@ -129,7 +129,7 @@ should be aware of the behaviour and limitations of the transform outlined by
the cases below.
Comments inside loop headers
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------------------
Comments inside the original loop header are ignored and deleted when
transformed.
@@ -139,7 +139,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
@@ -205,7 +205,7 @@ transformed loop if ``.end()`` was originally called after each iteration.
}
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
@@ -225,7 +225,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
OpenPOWER on IntegriCloud