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

Chris Lattner sabre at nondot.org
Thu Dec 9 15:32:39 PST 2010


Author: lattner
Date: Thu Dec  9 17:32:39 2010
New Revision: 121430

URL: http://llvm.org/viewvc/llvm-project?rev=121430&view=rev
Log:
add a rule for enums, patch by Zhanyong Wan!

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=121430&r1=121429&r2=121430&view=diff
==============================================================================
--- llvm/trunk/docs/CodingStandards.html (original)
+++ llvm/trunk/docs/CodingStandards.html Thu Dec  9 17:32:39 2010
@@ -824,10 +824,12 @@
 should be in camel case (e.g. <tt>TextFileReader</tt>
 and <tt>isLValue()</tt>).  Type names (including classes, structs,
 enums, typedefs, etc) should be nouns and start with an upper-case
-letter (e.g. <tt>TextFileReader</tt>).  Function names should be verb
-phrases (as they represent actions) and start with a lower-case letter
-(e.g. a predicate may be named <tt>isFoo()</tt> or <tt>hasBar()</tt>,
-while the name of a command-like function should be imperative,
+letter (e.g. <tt>TextFileReader</tt>).  An <tt>enum</tt> for all the
+different kinds of something should be named with the <tt>Kind</tt>
+suffix.  Function names should be verb phrases (as they represent
+actions) and start with a lower-case letter (e.g. a predicate may be
+named <tt>isFoo()</tt> or <tt>hasBar()</tt>, while the name of a
+command-like function should be imperative,
 like <tt>openFile()</tt>).</p>
 
 <p>Enumerators and public member variables should start with an





More information about the llvm-commits mailing list