summaryrefslogtreecommitdiff
path: root/docs/CodingStandards.rst
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-09-20 02:01:06 +0000
committerAndrew Trick <atrick@apple.com>2012-09-20 02:01:06 +0000
commit331e8fb760736f42a524515d218de61f54ce6e81 (patch)
treec537ee429e742eb40d9d9cd1587d3d06137b40e0 /docs/CodingStandards.rst
parente603fe46649aee6f6aeca1668f0b617818af1e1d (diff)
downloadllvm-331e8fb760736f42a524515d218de61f54ce6e81.tar.gz
llvm-331e8fb760736f42a524515d218de61f54ce6e81.tar.bz2
llvm-331e8fb760736f42a524515d218de61f54ce6e81.tar.xz
Fix static function names in CodingStandards examples.
Try not to violate conventions immediately before explaining them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/CodingStandards.rst')
-rw-r--r--docs/CodingStandards.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/CodingStandards.rst b/docs/CodingStandards.rst
index 4d16e2a9bd..cb57b89029 100644
--- a/docs/CodingStandards.rst
+++ b/docs/CodingStandards.rst
@@ -601,9 +601,9 @@ code to be structured like this:
.. code-block:: c++
- /// ListContainsFoo - Return true if the specified list has an element that is
+ /// containsFoo - Return true if the specified list has an element that is
/// a foo.
- static bool ListContainsFoo(const std::vector<Bar*> &List) {
+ static bool containsFoo(const std::vector<Bar*> &List) {
for (unsigned i = 0, e = List.size(); i != e; ++i)
if (List[i]->isFoo())
return true;
@@ -611,7 +611,7 @@ code to be structured like this:
}
...
- if (ListContainsFoo(BarList)) {
+ if (containsFoo(BarList)) {
...
}
@@ -1120,7 +1120,7 @@ good:
};
} // end anonymous namespace
- static void Helper() {
+ static void runHelper() {
...
}
@@ -1140,7 +1140,7 @@ This is bad:
bool operator<(const char *RHS) const;
};
- void Helper() {
+ void runHelper() {
...
}
@@ -1150,7 +1150,7 @@ This is bad:
} // end anonymous namespace
-This is bad specifically because if you're looking at "``Helper``" in the middle
+This is bad specifically because if you're looking at "``runHelper``" in the middle
of a large C++ file, that you have no immediate way to tell if it is local to
the file. When it is marked static explicitly, this is immediately obvious.
Also, there is no reason to enclose the definition of "``operator<``" in the