xref: /llvm-project/clang/www/OpenProjects.html (revision e4009ed3d68ba8d9e78721ce5afc2b3a7edd6f36)
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=utf-8">
6  <title>Clang - Open Projects</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 anyone 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
21<a href="https://discourse.llvm.org/c/clang">Discourse</a> for more specifics
22or to verify that one of these isn't already completed.</p>
23
24<ul>
25<li><b>Refresh and improve Clang's documentation</b>: Clang is inconsistent
26with documenting implementation-defined behaviors. We have significant
27documentation in the <a href="https://clang.llvm.org/docs/LanguageExtensions.html">
28Language Extensions</a> page, but the information is incomplete and the page is
29difficult to navigate. We would appreciate help with:
30<ul>
31  <li>improving the way this information is presented to users,</li>
32  <li><a href="https://llvm.org/docs/TableGen/">table generating</a>
33      documentation where possible, such as for implementation limits or other
34      target-specific information,</li>
35  <li>adding documentation for currently
36     <a href="https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/AttrDocs.td">
37     undocumented attributes</a>,</li>
38  <li>documenting <a href="https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/DiagnosticDocs.td">
39      diagnostic group flags</a> (adding code examples of what is diagnosed, or
40      other relevant information), or</li>
41  <li>documenting <a href="https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Options.td">
42      command line options</a>, or</li>
43  <li>help with completing other missing documentation.</li>
44</ul>
45These projects are independent of each other.</li>
46
47<li><b>Complete the investigation into Clang's C conformance</b>: Clang's
48<a href="c_status.html">C status page</a> contain a number of entries marked as
49<code>Unknown</code>. Completing the investigation involves adding
50<a href="https://github.com/llvm/llvm-project/tree/main/clang/test/C">test
51coverage</a> for the various standards papers and updating the documentation
52accordingly.
53</li>
54
55<li><b>Improve Clang's C and C++ standard conformance test coverage</b>:
56Clang's test suite is structured such that most tests are written to provide
57coverage for what part of the compiler the feature's implementation exists in;
58we have parsing tests in <code>clang/test/Parser</code>, and semantic analysis
59tests in <code>clang/test/Sema*</code>, etc. We also have tests written to
60provide coverage for the standard requirements (<code>clang/test/CXX</code> and
61<code>clang/test/C</code>). The standards coverage is not structured in a way
62that makes it easy to maintain as the standards change over time. No commercial
63conformance test suite has a license model suitable for open source projects,
64so we would appreciate help in improving the existing coverage we have both in
65terms of layout of the tests as well as in coverage of the various standard
66modes.</li>
67
68<li><b>Complete the investigation into Clang's C and C++ Defect Report
69conformance</b>: Separate from (but related to) general conformance testing is
70determining which <a href="c_dr_status.html">C defect reports</a> and
71<a href="cxx_dr_status.html">C++ defect reports</a> Clang implements. These
72lists currently have a number of entries marked as <code>Unknown</code>.
73Completing the investigation involves adding test coverage for
74<a href="https://github.com/llvm/llvm-project/tree/main/clang/test/C/drs">C</a>
75and
76<a href="https://github.com/llvm/llvm-project/tree/main/clang/test/CXX/drs">C++</a>
77defect reports and updating the documentation accordingly.</li>
78
79<li><b>Bug triage</b>: Clang's <a href="https://github.com/llvm/llvm-project/issues">
80issue tracker</a>currently has over 20,000 open issues, many of which are not
81appropriately tagged, are no longer reproducible, could use a reduced test case,
82or otherwise needs some manual interaction. We can always use help with
83<a href="https://llvm.org/docs/BugLifeCycle.html#triaging-bugs">bug triage and
84issue tracker maintenance</a>.
85</li>
86
87<li><b>Improve build times with Clang</b>: the time it takes Clang to process a
88translation unit is very important to our users; the lower the build time, the
89better the overall user experience. It would be good to improve Clang's
90performance as well as to find ways to proactively alert us when we've
91introduced a change that has significant negative impact on build times.</li>
92
93<li><b>Improve clang-doc</b>: Clang's library-based design allows it to be used
94by a variety of tools that reason about source code.
95<a href="https://clang.llvm.org/extra/clang-doc.html">clang-doc</a> is one
96great application of this functionality, which generates code documentation
97from source code. The tool is in early stages of development and could use more
98dedicated effort to complete the implementation.</li>
99
100<li><b>Self-testing using clang</b>: There are several neat ways to
101improve the quality of clang by self-testing. Some examples:
102<ul>
103  <li>Improve the reliability of AST printing and serialization by
104  ensuring that the AST produced by clang on an input doesn't change
105  when it is reparsed or unserialized.
106
107  <li>Improve parser reliability and error generation by automatically
108  or randomly changing the input checking that clang doesn't crash and
109  that it doesn't generate excessive errors for small input
110  changes. Manipulating the input at both the text and token levels is
111  likely to produce interesting test cases.
112</ul>
113</li>
114
115<li><b>Continue work on C++20, C++23, C++2c, and C23 support</b>:
116  There are still several C++20 features to complete, and work has begun on
117  supporting the latest language standards. Please see the
118  <a href="cxx_status.html">C++ status report page</a> to find out what is
119  missing.</li>
120
121<li><b>StringRef'ize APIs</b>: A thankless but incredibly useful project is
122StringRef'izing (converting to use <tt>llvm::StringRef</tt> instead of <tt>const
123char *</tt> or <tt>std::string</tt>) various clang interfaces. This generally
124simplifies the code and makes it more efficient.</li>
125
126<li><b>Configuration Manager</b>: Clang/LLVM works on a large number of
127architectures and operating systems and can cross-compile to a similarly large
128number of configurations, but the pitfalls of choosing the command-line
129options, making sure the right sub-architecture is chosen and that the correct
130optional elements of your particular system can be a pain.
131
132<p>A tool that would investigate hosts and targets, and store the configuration
133in files that can later be used by Clang itself to avoid command-line options,
134especially the ones regarding which target options to use, would greatly alleviate
135this problem. A simple tool, with little or no dependency on LLVM itself, that
136will investigate a target architecture by probing hardware, software, libraries
137and compiling and executing code to identify all properties that would be relevant
138to command-line options (VFP, SSE, NEON, ARM vs. Thumb etc), triple settings etc.</p>
139
140<p>The first stage is to build a CFLAGS for Clang that would produce code on the
141current Host to the identified Target.</p>
142
143<p>The second stage would be to produce a configuration file (that can be used
144independently of the Host) so that Clang can read it and not need a gazillion
145of command-line options. Such file should be simple JSON / INI or anything that
146a text editor could change.</p></li>
147</ul>
148
149<p>If you hit a bug with Clang, it is very useful for us if you reduce the code
150that demonstrates the problem down to something small. There are many ways to
151do this; ask on <a href="https://discourse.llvm.org/c/clang">Discourse</a>,
152<a href="https://discord.com/channels/636084430946959380/636725486533345280">Discord</a>
153for advice.</p>
154
155</div>
156</body>
157</html>
158