Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 79bba50

Browse files
committed
Add a Coding Standards section to hacking.html, and point out that cstdio is forbidden.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94137 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f3f91f3 commit 79bba50

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

www/hacking.html

+22
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ <h1>Hacking on Clang</h1>
1919
on Clang for developers who are new to the Clang and/or LLVM
2020
codebases.</p>
2121
<ul>
22+
<li><a href="#style">Coding Standards</a></li>
2223
<li><a href="#docs">Developer Documentation</a></li>
2324
<li><a href="#debugging">Debugging</a></li>
2425
<li><a href="#testing">Testing</a></li>
@@ -30,6 +31,27 @@ <h1>Hacking on Clang</h1>
3031
<li><a href="#irgen">LLVM IR Generation</a></li>
3132
</ul>
3233

34+
<!--=====================================================================-->
35+
<h2 id="docs">Coding Standards</h2>
36+
<!--=====================================================================-->
37+
38+
<p>Clang follows the
39+
LLVM <a href="http://llvm.org/docs/CodingStandards.html">Coding
40+
Standards</a>. When submitting patches, please take care to follow these standards
41+
and to match the style of the code to that present in Clang (for example, in
42+
terms of indentation, bracing, and statement spacing).</p>
43+
44+
<p>Clang has a few additional coding standards:</p>
45+
<ul>
46+
<li><i>cstdio is forbidden</i>: library code should not output diagnostics
47+
or other information using <tt>cstdio</tt>; debugging routines should
48+
use <tt>llvm::errs()</tt>. Other uses of <tt>cstdio</tt> impose behavior
49+
upon clients and block integrating Clang as a library. Libraries should
50+
support <tt>raw_ostream</tt> based interfaces for textual
51+
output. See <a href="http://llvm.org/docs/CodingStandards.html#ll_raw_ostream">Coding
52+
Standards</a>.</li>
53+
</ul>
54+
3355
<!--=====================================================================-->
3456
<h2 id="docs">Developer Documentation</h2>
3557
<!--=====================================================================-->

0 commit comments

Comments
 (0)