Douglas Gregor | ef52738 | 2009-03-13 15:06:27 +0000 | [diff] [blame] | 1 | <!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 |
| 19 | on what your interests are. This list is provided to generate ideas, it is not |
| 20 | intended to be comprehensive. Please ask on cfe-dev for more specifics or to |
| 21 | verify that one of these isn't already completed. :)</p> |
| 22 | |
| 23 | <ul> |
| 24 | <li><b>Compile your favorite C/ObjC project with Clang</b>: |
| 25 | Clang'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 |
| 26 | rejected 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, |
Douglas Gregor | 01cd4fb | 2009-06-11 14:59:18 +0000 | [diff] [blame] | 27 | the <a href="get_started.html#driver"><code>clang</code></a> driver works as a drop-in replacement for GCC.</li> |
Douglas Gregor | ef52738 | 2009-03-13 15:06:27 +0000 | [diff] [blame] | 28 | |
Douglas Gregor | 6ba70bf | 2009-06-11 14:53:37 +0000 | [diff] [blame] | 29 | <li><b>Undefined behavior checking</b>: CodeGen could |
Douglas Gregor | ef52738 | 2009-03-13 15:06:27 +0000 | [diff] [blame] | 30 | insert runtime checks for all sorts of different undefined behaviors, from |
| 31 | reading uninitialized variables, buffer overflows, and many other things. This |
| 32 | checking would be expensive, but the optimizers could eliminate many of the |
| 33 | checks in some cases, and it would be very interesting to test code in this mode |
| 34 | for certain crowds of people. Because the inserted code is coming from clang, |
| 35 | the "abort" message could be very detailed about exactly what went wrong.</li> |
| 36 | |
Douglas Gregor | ef52738 | 2009-03-13 15:06:27 +0000 | [diff] [blame] | 37 | <li><b>Improve target support</b>: The current target interfaces are heavily |
| 38 | stubbed out and need to be implemented fully. See the FIXME's in TargetInfo. |
| 39 | Additionally, the actual target implementations (instances of TargetInfoImpl) |
| 40 | also need to be completed.</li> |
| 41 | |
| 42 | <li><b>Implement an tool to generate code documentation</b>: Clang's |
| 43 | library-based design allows it to be used by a variety of tools that reason |
| 44 | about source code. One great application of Clang would be to build an |
| 45 | auto-documentation system like doxygen that generates code documentation from |
| 46 | source code. The advantage of using Clang for such a tool is that the tool would |
| 47 | use the same preprocessor/parser/ASTs as the compiler itself, giving it a very |
| 48 | rich understanding of the code.</li> |
| 49 | |
| 50 | <li><b>Use clang libraries to implement better versions of existing tools</b>: |
| 51 | Clang is built as a set of libraries, which means that it is possible to |
| 52 | implement capabilities similar to other source language tools, improving them |
| 53 | in various ways. Two examples are <a href="http://distcc.samba.org/">distcc</a> |
| 54 | and the <a href="http://delta.tigris.org/">delta testcase reduction tool</a>. |
Douglas Gregor | 6ba70bf | 2009-06-11 14:53:37 +0000 | [diff] [blame] | 55 | The former can be improved to scale better and be more efficient. The latter |
Douglas Gregor | ef52738 | 2009-03-13 15:06:27 +0000 | [diff] [blame] | 56 | could also be faster and more efficient at reducing C-family programs if built |
| 57 | on the clang preprocessor.</li> |
| 58 | |
| 59 | <li><b>Use clang libraries to extend Ragel with a JIT</b>: <a |
| 60 | href="http://research.cs.queensu.ca/~thurston/ragel/">Ragel</a> is a state |
| 61 | machine compiler that lets you embed C code into state machines and generate |
| 62 | C code. It would be relatively easy to turn this into a JIT compiler using |
| 63 | LLVM.</li> |
| 64 | |
| 65 | <li><b>Self-testing using clang</b>: There are several neat ways to |
| 66 | improve 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 | |
Gabor Greif | 930673b | 2010-10-16 09:29:38 +0000 | [diff] [blame] | 80 | <li><b>Continue work on C++ support</b>: Implementing all of C++ was a very big job, but there are still lots of |
| 81 | little pieces that can be improved. Here are some small- to mid-sized C++ implementation projects: |
Douglas Gregor | 2523565 | 2009-03-20 20:37:36 +0000 | [diff] [blame] | 82 | <ul> |
Douglas Gregor | 742f2cd | 2009-06-15 19:53:21 +0000 | [diff] [blame] | 83 | <li>Fix bugs: there are a number of XFAIL'd test cases in Clang's repository (particularly in the CXX subdirectory). Pick a test case and fix Clang to make it work!</li> |
| 84 | <li>Write tests: the CXX test subdirectory in Clang's repository has placeholders for tests of every paragraph in the C++ standard. Pick a paragraph, write a few tests, and see if they work! Even if they don't we'd still like the new tests (with XFAIL'd) so that we know what to fix.</li> |
Douglas Gregor | 2523565 | 2009-03-20 20:37:36 +0000 | [diff] [blame] | 85 | </ul> |
| 86 | |
| 87 | Also, see the <a href="cxx_status.html">C++ status report page</a> to |
| 88 | find out what is missing and what is already at least partially |
| 89 | supported.</li> |
Douglas Gregor | ef52738 | 2009-03-13 15:06:27 +0000 | [diff] [blame] | 90 | </ul> |
| 91 | |
| 92 | <p>If you hit a bug with clang, it is very useful for us if you reduce the code |
| 93 | that demonstrates the problem down to something small. There are many ways to |
| 94 | do this; ask on cfe-dev for advice.</p> |
| 95 | |
Gabor Greif | 67f94b8 | 2010-10-16 09:40:21 +0000 | [diff] [blame^] | 96 | <ul> |
Daniel Dunbar | 09becee | 2009-10-17 20:43:50 +0000 | [diff] [blame] | 97 | <li><b>StringRef'ize APIs</b>: A thankless but incredibly useful project is |
| 98 | StringRef'izing (converting to use <tt>llvm::StringRef</tt> instead of <tt>const |
| 99 | char *</tt> or <tt>std::string</tt>) various clang interfaces. This generally |
| 100 | simplifies the code and makes it more efficient.</li> |
| 101 | |
Daniel Dunbar | b114d2e | 2009-10-17 21:50:11 +0000 | [diff] [blame] | 102 | <li><b>Universal Driver</b>: Clang is inherently a cross compiler. We would like |
| 103 | to define a new model for cross compilation which provides a great user |
| 104 | experience -- it should be easy to cross compile applications, install support |
| 105 | for new architectures, access different compilers and tools, and be consistent |
| 106 | across different platforms. See the <a href="UniversalDriver.html">Universal |
| 107 | Driver</a> web page for more information.</li> |
Gabor Greif | 67f94b8 | 2010-10-16 09:40:21 +0000 | [diff] [blame^] | 108 | </ul> |
Daniel Dunbar | b114d2e | 2009-10-17 21:50:11 +0000 | [diff] [blame] | 109 | |
Douglas Gregor | ef52738 | 2009-03-13 15:06:27 +0000 | [diff] [blame] | 110 | </div> |
| 111 | </body> |
| 112 | </html> |