diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-06-30 06:20:03 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-06-30 06:20:03 +0000 |
| commit | 6ad089cc54289c061543fdf90a5c322b72441ae4 (patch) | |
| tree | 13c5560c581c03df8f3703405dde8746fb9eda65 /llvm/docs/CodingStandards.html | |
| parent | 56c10949999790d0d055b0545420ed6bb84d5b12 (diff) | |
| download | bcm5719-llvm-6ad089cc54289c061543fdf90a5c322b72441ae4.tar.gz bcm5719-llvm-6ad089cc54289c061543fdf90a5c322b72441ae4.zip | |
fix some issues Jeff Yasskin noticed
llvm-svn: 74512
Diffstat (limited to 'llvm/docs/CodingStandards.html')
| -rw-r--r-- | llvm/docs/CodingStandards.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/docs/CodingStandards.html b/llvm/docs/CodingStandards.html index 84503ca6795..ff29b39d6b7 100644 --- a/llvm/docs/CodingStandards.html +++ b/llvm/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 |

