blob: 2893b23ba6c58cca2830afefb96c9b6763cbcf31 [file] [log] [blame]
Cedric Venet3d658642009-02-14 20:20:19 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4<head>
5 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
6 <title>Clang - Get Involved</title>
7 <link type="text/css" rel="stylesheet" href="menu.css" />
8 <link type="text/css" rel="stylesheet" href="content.css" />
9</head>
10<body>
11
12<!--#include virtual="menu.html.incl"-->
13
14<div id="content">
15
16<h1>Getting Involved with the Clang Project</h1>
17
18<p>Once you have <a href="get_started.html">checked out and built</a> clang and
19played around with it, you might be wondering what you can do to make it better
20and contribute to its development. Alternatively, maybe you just want to follow
21the development of the project to see it progress.
22</p>
23
24<h2>Follow what's going on</h2>
25
26<p>Clang is a subproject of the <a href="http://llvm.org">LLVM Project</a>, but
27has its own mailing lists because the communities have people with different
28interests. The two clang lists are:</p>
29
30<ul>
31<li><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits
32</a> - This list is for patch submission/discussion.</li>
33
34<li><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a> -
35This list is for everything else clang related (questions and answers, bug
36reports, etc).</li>
37
38</ul>
39
40<p>If you are interested in clang only, these two lists should be all
41you need. If you are interested in the LLVM optimizer and code generator,
42please consider signing up for <a
43href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">llvmdev</a> and <a
44href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
45as well.</p>
46
47
48<p>The best way to talk with other developers on the project is through the <a
49href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev mailing
50list</a>. The clang mailing list is a very friendly place and we welcome
51newcomers. In addition to the cfe-dev list, a significant amount of design
52discussion takes place on the <a
53href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits mailing
54list</a>. All of these lists have archives, so you can browse through previous
55discussions or follow the list development on the web if you prefer.</p>
56
57
58<h2>Open Projects</h2>
59
60<p>Here are a few tasks that are available for newcomers to work on, depending
61on what your interests are. This list is provided to generate ideas, it is not
62intended to be comprehensive. Please ask on cfe-dev for more specifics or to
63verify that one of these isn't already completed. :)</p>
64
65<ul>
66<li><b>Compile your favorite C/ObjC project with "clang -fsyntax-only"</b>:
67the clang type checker and verifier is quite close to complete (but not bug
68free!) for C and Objective C. We appreciate all reports of code that is
69rejected by the front-end, and if you notice invalid code that is not rejected
70by clang, that is also very important to us. For make-based projects,
71the <a href="get_started.html#ccc"><code>ccc</code></a> script in clang's
72<tt>utils</tt> folder might help to get you started.</li>
73
74<li><b>Compile your favorite C project with "clang -emit-llvm"</b>:
75The clang to LLVM converter is getting more mature, so you may be able to
76compile it. If not, please let us know. Again,
77<a href="get_started.html#ccc"><code>ccc</code></a> might help you. Once it
78compiles it should run. If not, that's a bug :)</li>
79
Cedric Venet3d658642009-02-14 20:20:19 +000080<li><b>Overflow detection</b>: an interesting project would be to add a -ftrapv
81compilation mode that causes -emit-llvm to generate overflow tests for all
82signed integer arithmetic operators, and call abort if they overflow. Overflow
83is undefined in C and hard for people to reason about. LLVM IR also has
84intrinsics for generating arithmetic with overflow checks directly.</li>
85
86<li><b>Undefined behavior checking</b>: similar to adding -ftrapv, codegen could
87insert runtime checks for all sorts of different undefined behaviors, from
88reading uninitialized variables, buffer overflows, and many other things. This
89checking would be expensive, but the optimizers could eliminate many of the
90checks in some cases, and it would be very interesting to test code in this mode
91for certain crowds of people. Because the inserted code is coming from clang,
92the "abort" message could be very detailed about exactly what went wrong.</li>
93
94<li><b>Continue work on C++ support</b>: Implementing all of C++ is a very big
95job, but there are lots of little pieces that can be picked off and implemented.
96See the <a href="cxx_status.html">C++ status report page</a> to find out what is
97missing and what is already at least partially supported.</li>
98
99<li><b>Improve target support</b>: The current target interfaces are heavily
100stubbed out and need to be implemented fully. See the FIXME's in TargetInfo.
101Additionally, the actual target implementations (instances of TargetInfoImpl)
Chris Lattner12f708d2009-02-25 05:39:01 +0000102also need to be completed.</li>
Cedric Venet3d658642009-02-14 20:20:19 +0000103
104<li><b>Implement an tool to generate code documentation</b>: Clang's
105library-based design allows it to be used by a variety of tools that reason
106about source code. One great application of Clang would be to build an
107auto-documentation system like doxygen that generates code documentation from
108source code. The advantage of using Clang for such a tool is that the tool would
109use the same preprocessor/parser/ASTs as the compiler itself, giving it a very
110rich understanding of the code.</li>
111
112<li><b>Use clang libraries to implement better versions of existing tools</b>:
113Clang is built as a set of libraries, which means that it is possible to
114implement capabilities similar to other source language tools, improving them
115in various ways. Two examples are <a href="http://distcc.samba.org/">distcc</a>
116and the <a href="http://delta.tigris.org/">delta testcase reduction tool</a>.
117The former can be improved to scale better and be more efficient. The later
118could also be faster and more efficient at reducing C-family programs if built
119on the clang preprocessor.</li>
120
121<li><b>Use clang libraries to extend Ragel with a JIT</b>: <a
122href="http://research.cs.queensu.ca/~thurston/ragel/">Ragel</a> is a state
123machine compiler that lets you embed C code into state machines and generate
124C code. It would be relatively easy to turn this into a JIT compiler using
125LLVM.</li>
126
127<li><b>Self-testing using clang</b>: There are several neat ways to
128improve the quality of clang by self-testing. Some examples:
129<ul>
130 <li>Improve the reliability of AST printing and serialization by
131 ensuring that the AST produced by clang on an input doesn't change
132 when it is reparsed or unserialized.
133
134 <li>Improve parser reliability and error generation by automatically
135 or randomly changing the input checking that clang doesn't crash and
136 that it doesn't generate excessive errors for small input
137 changes. Manipulating the input at both the text and token levels is
138 likely to produce interesting test cases.
139</ul>
140</li>
141
142</ul>
143
144<p>If you hit a bug with clang, it is very useful for us if you reduce the code
145that demonstrates the problem down to something small. There are many ways to
146do this; ask on cfe-dev for advice.</p>
147
148</div>
149</body>
150</html>