projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6b49ef
)
Minor fix in docs.
author
Alexander Kornienko
<alexfh@google.com>
Thu, 5 Apr 2018 12:48:22 +0000
(12:48 +0000)
committer
Alexander Kornienko
<alexfh@google.com>
Thu, 5 Apr 2018 12:48:22 +0000
(12:48 +0000)
llvm-svn: 329277
llvm/docs/CodingStandards.rst
patch
|
blob
|
history
diff --git
a/llvm/docs/CodingStandards.rst
b/llvm/docs/CodingStandards.rst
index
4c515f6
..
1d631cc
100644
(file)
--- a/
llvm/docs/CodingStandards.rst
+++ b/
llvm/docs/CodingStandards.rst
@@
-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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^