aboutsummaryrefslogtreecommitdiff
path: root/docs/CodingStandards.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-30 06:20:03 +0000
committerChris Lattner <sabre@nondot.org>2009-06-30 06:20:03 +0000
commit09bc65e62bb157141f0d3c6bc9c3f23cc4f83050 (patch)
treebee6af8e10f993e9bc70822f2f93cf8bbda37169 /docs/CodingStandards.html
parent0af39ea9ef297bfbe87b6c12fd72432a06945637 (diff)
fix some issues Jeff Yasskin noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/CodingStandards.html')
-rw-r--r--docs/CodingStandards.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/CodingStandards.html b/docs/CodingStandards.html
index 84503ca679..ff29b39d6b 100644
--- a/docs/CodingStandards.html
+++ b/docs/CodingStandards.html
@@ -700,7 +700,7 @@ A convenient way to do this is like so:</p>
semantics: if the container (a basic block in this case) is being mutated, then
"<tt>BB->end()</tt>" may change its value every time through the loop and the
second loop may not in fact be correct. If you actually do depend on this
-behavior, please write the loop in the second form and add a comment indicating
+behavior, please write the loop in the first form and add a comment indicating
that you did it intentionally.</p>
<p>Why do we prefer the second form (when correct)? Writing the loop in the
@@ -712,7 +712,7 @@ expression was actually something like: "<tt>SomeMap[x]->end()</tt>" and map
lookups really aren't cheap. By writing it in the first form consistently, you
eliminate the issue entirely and don't even have to think about it.</p>
-<p>The second (even bigger) issue is that writing the loop in the second form
+<p>The second (even bigger) issue is that writing the loop in the first form
hints to the reader that the loop is mutating the container (a fact that a
comment would handily confirm!). If you write the loop in the second form, it
is immediately obvious without even looking at the body of the loop that the