summaryrefslogtreecommitdiff
path: root/docs/CodingStandards.html
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2008-12-11 19:37:04 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2008-12-11 19:37:04 +0000
commit2d33c5443a5af06852ca172e60d48837ab9f352c (patch)
tree47141a84761f78027bf6edbc1d577985bece6314 /docs/CodingStandards.html
parentf00ddb04dfdef01a0389fa4c3cf63f7fa23627b9 (diff)
downloadllvm-2d33c5443a5af06852ca172e60d48837ab9f352c.tar.gz
llvm-2d33c5443a5af06852ca172e60d48837ab9f352c.tar.bz2
llvm-2d33c5443a5af06852ca172e60d48837ab9f352c.tar.xz
* <div align=center> is not valid HTML 4.01 - removed alignment
* <sup> cannot appear inside a <pre> - replaced <pre> with <tt> and <br> * Added standard "Notes" section * Sprinkled fixed-width <tt> tags in a few places for consistency git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60889 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/CodingStandards.html')
-rw-r--r--docs/CodingStandards.html34
1 files changed, 19 insertions, 15 deletions
diff --git a/docs/CodingStandards.html b/docs/CodingStandards.html
index 2c7eeead79..a9b3698ae4 100644
--- a/docs/CodingStandards.html
+++ b/docs/CodingStandards.html
@@ -526,7 +526,6 @@ library. There are two problems with this:</p>
example) is allowed normally, it is just <tt>&lt;iostream&gt;</tt> that is
causing problems.</p>
-<div align="center">
<table>
<tbody>
<tr>
@@ -571,17 +570,22 @@ DEBUG(dump(DOUT));</pre></td>
<td align="left"><pre>void print(std::ostream &amp;Out);
// ...
print(std::cerr);</pre></td>
- <td align="left"><pre>void print(llvm::OStream Out);<sup>1</sup>
-// ...
-print(llvm::cerr);</pre>
+ <td align="left"><tt>void print(llvm::OStream Out);<sup><a href="#sn_1">1</a></sup><br>
+// ...<br>
+print(llvm::cerr);</tt>
+ </td>
+ </tr>
+ </tbody>
+</table>
-</td> </tbody> </table>
-</div>
+<p><b>Notes:</b></p>
-<div class="doc_text">
-<p><sup>1</sup><tt>llvm::OStream</tt> is a light-weight class so it should never
-be passed by reference. This is important because in some configurations,
-<tt>DOUT</tt> is an rvalue.</p>
+<div class="doc_notes">
+<ol>
+<li><a name="sn_1"><tt>llvm::OStream</tt></a> is a light-weight class so it
+ should never be passed by reference. This is important because in some
+ configurations, <tt>DOUT</tt> is an rvalue.</li>
+</ol>
</div>
</div>
@@ -675,8 +679,8 @@ namespace with an "<tt>std::</tt>" prefix, rather than rely on
"<tt>using namespace std;</tt>".</p>
<p> In header files, adding a '<tt>using namespace XXX</tt>' directive pollutes
-the namespace of any source file that includes the header. This is clearly a
-bad thing.</p>
+the namespace of any source file that <tt>#include</tt>s the header. This is
+clearly a bad thing.</p>
<p>In implementation files (e.g. .cpp files), the rule is more of a stylistic
rule, but is still important. Basically, using explicit namespace prefixes
@@ -710,9 +714,9 @@ others.</p>
<p>If a class is defined in a header file and has a v-table (either it has
virtual methods or it derives from classes with virtual methods), it must
always have at least one out-of-line virtual method in the class. Without
-this, the compiler will copy the vtable and RTTI into every .o file that
-#includes the header, bloating .o file sizes and increasing link times.
-</p>
+this, the compiler will copy the vtable and RTTI into every <tt>.o</tt> file
+that <tt>#include</tt>s the header, bloating <tt>.o</tt> file sizes and
+increasing link times.</p>
</div>