summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-01-22 02:04:46 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-01-22 02:04:46 +0000
commitd6f13c3ff99f5067a04c124a92f4b58578152816 (patch)
treedd2dc0630eecd95b9636521b2a967468bb2000e0 /clang
parent42e3df065e862335cfea4796da362e455c73cee2 (diff)
downloadbcm5719-llvm-d6f13c3ff99f5067a04c124a92f4b58578152816.tar.gz
bcm5719-llvm-d6f13c3ff99f5067a04c124a92f4b58578152816.zip
Add a Coding Standards section to hacking.html, and point out that cstdio is forbidden.
llvm-svn: 94137
Diffstat (limited to 'clang')
-rw-r--r--clang/www/hacking.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/www/hacking.html b/clang/www/hacking.html
index ec9cd97cbaa..3bbc0eaea84 100644
--- a/clang/www/hacking.html
+++ b/clang/www/hacking.html
@@ -19,6 +19,7 @@
on Clang for developers who are new to the Clang and/or LLVM
codebases.</p>
<ul>
+ <li><a href="#style">Coding Standards</a></li>
<li><a href="#docs">Developer Documentation</a></li>
<li><a href="#debugging">Debugging</a></li>
<li><a href="#testing">Testing</a></li>
@@ -31,6 +32,27 @@
</ul>
<!--=====================================================================-->
+ <h2 id="docs">Coding Standards</h2>
+ <!--=====================================================================-->
+
+ <p>Clang follows the
+ LLVM <a href="http://llvm.org/docs/CodingStandards.html">Coding
+ Standards</a>. When submitting patches, please take care to follow these standards
+ and to match the style of the code to that present in Clang (for example, in
+ terms of indentation, bracing, and statement spacing).</p>
+
+ <p>Clang has a few additional coding standards:</p>
+ <ul>
+ <li><i>cstdio is forbidden</i>: library code should not output diagnostics
+ or other information using <tt>cstdio</tt>; debugging routines should
+ use <tt>llvm::errs()</tt>. Other uses of <tt>cstdio</tt> impose behavior
+ upon clients and block integrating Clang as a library. Libraries should
+ support <tt>raw_ostream</tt> based interfaces for textual
+ output. See <a href="http://llvm.org/docs/CodingStandards.html#ll_raw_ostream">Coding
+ Standards</a>.</li>
+ </ul>
+
+ <!--=====================================================================-->
<h2 id="docs">Developer Documentation</h2>
<!--=====================================================================-->
OpenPOWER on IntegriCloud