blob: 9230106868059c0ee19b9c849b11e408e7d23eee [file] [log] [blame]
Douglas Gregoref527382009-03-13 15:06:27 +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>Open Clang Projects</h1>
17
18<p>Here are a few tasks that are available for newcomers to work on, depending
19on what your interests are. This list is provided to generate ideas, it is not
20intended to be comprehensive. Please ask on cfe-dev for more specifics or to
21verify that one of these isn't already completed. :)</p>
22
23<ul>
24<li><b>Compile your favorite C/ObjC project with Clang</b>:
25Clang's type-checking and code generation is very close to complete (but not bug free!) for C and Objective-C. We appreciate all reports of code that is
26rejected or miscompiled by the front-end. If you notice invalid code that is not rejected, or poor diagnostics when code is rejected, that is also very important to us. For make-based projects,
27the <a href="get_started.html#ccc"><code>ccc</code></a> driver works as a drop-in replacement for GCC.</li>
28
Douglas Gregor6ba70bf2009-06-11 14:53:37 +000029<li><b>Undefined behavior checking</b>: CodeGen could
Douglas Gregoref527382009-03-13 15:06:27 +000030insert runtime checks for all sorts of different undefined behaviors, from
31reading uninitialized variables, buffer overflows, and many other things. This
32checking would be expensive, but the optimizers could eliminate many of the
33checks in some cases, and it would be very interesting to test code in this mode
34for certain crowds of people. Because the inserted code is coming from clang,
35the "abort" message could be very detailed about exactly what went wrong.</li>
36
Douglas Gregoref527382009-03-13 15:06:27 +000037<li><b>Improve target support</b>: The current target interfaces are heavily
38stubbed out and need to be implemented fully. See the FIXME's in TargetInfo.
39Additionally, the actual target implementations (instances of TargetInfoImpl)
40also need to be completed.</li>
41
42<li><b>Implement an tool to generate code documentation</b>: Clang's
43library-based design allows it to be used by a variety of tools that reason
44about source code. One great application of Clang would be to build an
45auto-documentation system like doxygen that generates code documentation from
46source code. The advantage of using Clang for such a tool is that the tool would
47use the same preprocessor/parser/ASTs as the compiler itself, giving it a very
48rich understanding of the code.</li>
49
50<li><b>Use clang libraries to implement better versions of existing tools</b>:
51Clang is built as a set of libraries, which means that it is possible to
52implement capabilities similar to other source language tools, improving them
53in various ways. Two examples are <a href="http://distcc.samba.org/">distcc</a>
54and the <a href="http://delta.tigris.org/">delta testcase reduction tool</a>.
Douglas Gregor6ba70bf2009-06-11 14:53:37 +000055The former can be improved to scale better and be more efficient. The latter
Douglas Gregoref527382009-03-13 15:06:27 +000056could also be faster and more efficient at reducing C-family programs if built
57on the clang preprocessor.</li>
58
59<li><b>Use clang libraries to extend Ragel with a JIT</b>: <a
60href="http://research.cs.queensu.ca/~thurston/ragel/">Ragel</a> is a state
61machine compiler that lets you embed C code into state machines and generate
62C code. It would be relatively easy to turn this into a JIT compiler using
63LLVM.</li>
64
65<li><b>Self-testing using clang</b>: There are several neat ways to
66improve the quality of clang by self-testing. Some examples:
67<ul>
68 <li>Improve the reliability of AST printing and serialization by
69 ensuring that the AST produced by clang on an input doesn't change
70 when it is reparsed or unserialized.
71
72 <li>Improve parser reliability and error generation by automatically
73 or randomly changing the input checking that clang doesn't crash and
74 that it doesn't generate excessive errors for small input
75 changes. Manipulating the input at both the text and token levels is
76 likely to produce interesting test cases.
77</ul>
78</li>
79
Douglas Gregor25235652009-03-20 20:37:36 +000080<li><b>Continue work on C++ support</b>: Implementing all of C++ is a very big
81job, but there are lots of little pieces that can be picked off and implemented. Here are some small- to mid-sized C++ implementation projects:
82<ul>
Douglas Gregor25235652009-03-20 20:37:36 +000083 <li>Type-checking for explicit conversions: currently follows C semantics, not C++ semantics.</li>
Douglas Gregor25235652009-03-20 20:37:36 +000084 <li>Qualified member references: C++ supports qualified member references such as <code>x-&gt;Base::foo</code>, but Clang has no parsing or semantic analysis for them.</li>
Douglas Gregor25235652009-03-20 20:37:36 +000085 <li>Implicit definitions of special member functions: Clang implicitly declares the various special member functions (default constructor, copy constructor, copy assignment operator, destructor) when necessary, but is not yet able to provide definitions for these functions.</li>
86 <li>Parsing and AST representations of friend classes and functions</li>
87 <li>AST representation for implicit C++ conversions: implicit conversions that involve non-trivial operations (e.g., invoking a user-defined conversion function, performing a base-to-derived or derived-to-base conversion) need explicit representation in Clang's AST.</li>
Douglas Gregorc6498f92009-03-24 16:16:53 +000088 <li>Improved diagnostics for overload resolution failures: after an overload resolution failure, we currently print out the overload resolution candidates. We should also print out the reason that each candidate failed, e.g., "too few arguments", "too many arguments", "cannot initialize parameter with an lvalue of type 'foo'", etc.</li>
Douglas Gregor25235652009-03-20 20:37:36 +000089</ul>
90
91Also, see the <a href="cxx_status.html">C++ status report page</a> to
92find out what is missing and what is already at least partially
93supported.</li>
Douglas Gregoref527382009-03-13 15:06:27 +000094</ul>
95
96<p>If you hit a bug with clang, it is very useful for us if you reduce the code
97that demonstrates the problem down to something small. There are many ways to
98do this; ask on cfe-dev for advice.</p>
99
100</div>
101</body>
102</html>