[llvm-commits] [llvm] r137497 - /llvm/trunk/docs/CodingStandards.html

Chris Lattner sabre at nondot.org
Fri Aug 12 12:49:17 PDT 2011


Author: lattner
Date: Fri Aug 12 14:49:16 2011
New Revision: 137497

URL: http://llvm.org/viewvc/llvm-project?rev=137497&view=rev
Log:
apparently variable naming conventions never got added, document the
prevailing convention.  Thanks to Dave Zarzycki for the patch.

Modified:
    llvm/trunk/docs/CodingStandards.html

Modified: llvm/trunk/docs/CodingStandards.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodingStandards.html?rev=137497&r1=137496&r2=137497&view=diff
==============================================================================
--- llvm/trunk/docs/CodingStandards.html (original)
+++ llvm/trunk/docs/CodingStandards.html Fri Aug 12 14:49:16 2011
@@ -854,8 +854,12 @@
 
 <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





More information about the llvm-commits mailing list