Skip to content

Commit

Permalink
Minor fix in docs.
Browse files Browse the repository at this point in the history
llvm-svn: 329277
  • Loading branch information
alexfh committed Apr 5, 2018
1 parent e6b49ef commit 94d9c39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/docs/CodingStandards.rst
Expand Up @@ -808,8 +808,8 @@ As a rule of thumb, use ``auto &`` unless you need to copy the result, and use
for (auto Val : Container) { Val.change(); saveSomewhere(Val); }

// Copy pointers, but make it clear that they're pointers.
for (const auto \*Ptr : Container) { observe(\*Ptr); }
for (auto \*Ptr : Container) { Ptr->change(); }
for (const auto *Ptr : Container) { observe(*Ptr); }
for (auto *Ptr : Container) { Ptr->change(); }
Beware of non-determinism due to ordering of pointers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 94d9c39

Please sign in to comment.