diff options
author | Alexander Kornienko <alexfh@google.com> | 2018-04-05 12:48:22 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2018-04-05 12:48:22 +0000 |
commit | 94d9c391b6f20d5e1abd1832f0c2b1fff4426254 (patch) | |
tree | dd91b0645dd3185adbb8c5d3e3b94ee284e8755f | |
parent | e6b49ef286c2a60072872c01c7eee0414e9ee087 (diff) | |
download | bcm5719-llvm-94d9c391b6f20d5e1abd1832f0c2b1fff4426254.tar.gz bcm5719-llvm-94d9c391b6f20d5e1abd1832f0c2b1fff4426254.zip |
Minor fix in docs.
llvm-svn: 329277
-rw-r--r-- | llvm/docs/CodingStandards.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/docs/CodingStandards.rst b/llvm/docs/CodingStandards.rst index 4c515f6ace8..1d631ccd92f 100644 --- 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |