@@ -19,6 +19,7 @@ <h1>Hacking on Clang</h1>
19
19
on Clang for developers who are new to the Clang and/or LLVM
20
20
codebases.</ p >
21
21
< ul >
22
+ < li > < a href ="#style "> Coding Standards</ a > </ li >
22
23
< li > < a href ="#docs "> Developer Documentation</ a > </ li >
23
24
< li > < a href ="#debugging "> Debugging</ a > </ li >
24
25
< li > < a href ="#testing "> Testing</ a > </ li >
@@ -30,6 +31,27 @@ <h1>Hacking on Clang</h1>
30
31
< li > < a href ="#irgen "> LLVM IR Generation</ a > </ li >
31
32
</ ul >
32
33
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
+
33
55
<!--=====================================================================-->
34
56
< h2 id ="docs "> Developer Documentation</ h2 >
35
57
<!--=====================================================================-->
0 commit comments