summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CodingStandards.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-08-12 19:49:16 +0000
committerChris Lattner <sabre@nondot.org>2011-08-12 19:49:16 +0000
commit30e697ebaf4fc8a9b8cf6abecbc75ef1b9fa0dc0 (patch)
tree3d72c7e7cffeeb9c3cd2e3b5a7c8ea585dcba657 /llvm/docs/CodingStandards.html
parent2c945b3d88b977a7cb3777c75fb620622b7bab76 (diff)
downloadbcm5719-llvm-30e697ebaf4fc8a9b8cf6abecbc75ef1b9fa0dc0.tar.gz
bcm5719-llvm-30e697ebaf4fc8a9b8cf6abecbc75ef1b9fa0dc0.zip
apparently variable naming conventions never got added, document the
prevailing convention. Thanks to Dave Zarzycki for the patch. llvm-svn: 137497
Diffstat (limited to 'llvm/docs/CodingStandards.html')
-rw-r--r--llvm/docs/CodingStandards.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/docs/CodingStandards.html b/llvm/docs/CodingStandards.html
index 7f92b9a7cf0..a96f760e674 100644
--- a/llvm/docs/CodingStandards.html
+++ b/llvm/docs/CodingStandards.html
@@ -854,8 +854,12 @@ rules:</p>
<ul>
<li><p><b>Type names</b> (including classes, structs, enums, typedefs, etc)
- should be nouns and start with an upper-case letter (e.g.
- <tt>TextFileReader</tt>).</p></li>
+ should be nouns and start with an upper-case letter (e.g.
+ <tt>TextFileReader</tt>).</p></li>
+
+<li><p><b>Variable names</b> should be nouns (as they represent state). The
+ name should be camel case, and start with an upper case letter (e.g.
+ <tt>Leader</tt> or <tt>Boats</tt>).</p></li>
<li><p><b>Function names</b> should be verb phrases (as they represent
actions), and command-like function should be imperative. The name should
OpenPOWER on IntegriCloud