summaryrefslogtreecommitdiff
path: root/docs/CodingStandards.rst
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-08-07 19:34:37 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-08-07 19:34:37 +0000
commitf4c2104d00c47d65b216b7a63fa41f4be934bf5b (patch)
treee91012641ceb29a168a731a317000a5e54157410 /docs/CodingStandards.rst
parentee0dcf4b3ef6a0dbc03ceb96ca1bb6eef8b26e70 (diff)
downloadllvm-f4c2104d00c47d65b216b7a63fa41f4be934bf5b.tar.gz
llvm-f4c2104d00c47d65b216b7a63fa41f4be934bf5b.tar.bz2
llvm-f4c2104d00c47d65b216b7a63fa41f4be934bf5b.tar.xz
Add the common begin/end naming convention to the coding standard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/CodingStandards.rst')
-rw-r--r--docs/CodingStandards.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/CodingStandards.rst b/docs/CodingStandards.rst
index 4d66ad7574..9418680edc 100644
--- a/docs/CodingStandards.rst
+++ b/docs/CodingStandards.rst
@@ -796,7 +796,9 @@ In general, names should be in camel case (e.g. ``TextFileReader`` and
As an exception, classes that mimic STL classes can have member names in STL's
style of lower-case words separated by underscores (e.g. ``begin()``,
-``push_back()``, and ``empty()``).
+``push_back()``, and ``empty()``). Classes that provide multiple
+iterators should add a singular prefix to ``begin()`` and ``end()``
+(e.g. ``global_begin()`` and ``use_begin()``).
Here are some examples of good and bad names: