[PATCH] Add limitations to loop convert user doc
Edwin Vane
edwin.vane at intel.com
Thu Mar 21 16:16:55 PDT 2013
Sorry for more nits:) We're close this time!
================
Comment at: docs/LoopConvertTransform.rst:127
@@ +126,3 @@
+transformations that remove information and change semantics. Users of the tool
+should be aware of the behaviour and limitations of the transform in the cases
+below.
----------------
perhaps "outlined by" instead of "in"?
================
Comment at: docs/LoopConvertTransform.rst:162
@@ +161,3 @@
+of the loop is considered `risky`. If the called member function modifies the
+container, the semantics of the converted loop will differ due to ``.end()``
+being called only once.
----------------
No comma after 'container'.
================
Comment at: docs/LoopConvertTransform.rst:179
@@ +178,3 @@
+The original code above prints out the contents of the container including the
+newly added element, while the converted loop, shown below, will only print the
+original contents and not the newly added element.
----------------
no comma after 'element'
================
Comment at: docs/LoopConvertTransform.rst:196
@@ +195,3 @@
+Semantics will also be affected if ``.end()`` has side effects. For example, in
+the case where calls to ``.end()`` are logged, the semantics will change in the
+transformed loop if ``.end()`` was originally called after each iteration.
----------------
no comma after 'logged'.
================
Comment at: docs/LoopConvertTransform.rst:210
@@ +209,3 @@
+Similarly, if ``operator->()`` was overloaded to have side effects, such as
+logging, the semantics will change. In the original loop we may have used the
+arrow operator to dereference the iterator to call a member. This is no longer
----------------
Try to avoid the "royal we". The obvious fix, to use passive voice, should also be avoided if possible. Try something like:
If the iterator's arrow operator was used in the original loop the dot operator of a container element will be used instead due to the implicit dereference as part of the range-based for loop.
http://llvm-reviews.chandlerc.com/D552
More information about the cfe-commits
mailing list