summaryrefslogtreecommitdiffstats
path: root/www/cxx_status.html
blob: 7312c16b3bd96d736c1abbf3566476d89c5b3c2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
          "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>Clang - C++ and C++'0x Status</title>
  <link type="text/css" rel="stylesheet" href="menu.css">
  <link type="text/css" rel="stylesheet" href="content.css">
  <style type="text/css">
    .na { background-color: #C0C0C0; text-align: center; }
    .broken { background-color: #C11B17 }
    .basic  { background-color: #F88017 }
    .medium { background-color: #FDD017 }
    .advanced { background-color: #347C17 }
    .complete { background-color: #00FF00 }
  </style>
</head>
<body>

<!--#include virtual="menu.html.incl"-->

<div id="content">

<!--*************************************************************************-->
<h1>C++ and C++'0x Support in Clang</h1>
<!--*************************************************************************-->
<p>Last updated: $Date: 2010-08-26 16:20:18 +0200 (Thu, 26 Aug 2010) $</p>

  <ul>
    <li><a href="#projects">Projects Building with Clang</a></li>
    <li><a href="#specification">Implementation Status by Section</a></li>
    <li><a href="#cxx0x">C++0x Status</a></li>
  </ul>
  
<p>Clang currently implements all of the ISO C++ 1998 standard (including
  the defects addressed in the ISO C++ 2003 standard) except for 'export'
  (which has been removed from the C++'0x draft).
  However, the implementation of Clang C++ is still somewhat immature, with
  remaining bugs that may cause compiler crashes, erroneous errors and warnings,
  or miscompiled code. The <a href="http://llvm.org/bugs/">LLVM bug tracker</a>
  contains a Clang C++ component that tracks known Clang C++ bugs.</p>

 <h2 id="projects">Projects Building with Clang</h2>

  <p>Clang is now capable of compiling large C++ projects, and the following
   table describes various projects that we have attempted to compile with
   Clang++.</p>

<table width="689" border="1" cellspacing="0">
  <tr>
    <th>Project</th>
    <th>Status</th>
    <th>Last Tested</th>
    <th>Tracking Bug</th>
  </tr>
  <tr>
    <td><a href="http://clang.llvm.org">Clang</a> and <a href="http://llvm.org">LLVM</a></td>
    <td>Successful self-hosting achieved</td>
    <td>Continually</td>
    <td></td>
  </tr>
  <tr>
    <td><a href="http://www.cmake.org">CMake</a></td>
    <td>Compiles, passes regression tests (debug build)</td>
    <td>February 9, 2010</td>
    <td></td>
  </tr>
  <tr>
    <td><a href="http://www.boost.org">Boost</a></td>
    <td><a href="http://blog.llvm.org/2010/05/clang-builds-boost.html">Compiles
        and passes regression tests</a> on Darwin/X86-64.</td>
    <td>May 20, 2010</td>
    <td><a href="http://llvm.org/bugs/show_bug.cgi?id=6023"><del>PR6023</del></a></td>
  </tr>
  <tr>
    <td><a href="http://qt.nokia.com">Qt</a></td>
    <td>Partially compiles; miscompilation of uic prevents complete compilation, qmake works, some small examples also.</td>
    <td>February 9, 2010</td>
    <td><a href="http://llvm.org/bugs/show_bug.cgi?id=5881">PR5881</a></td>
  </tr>
</table>
  
<h2 id="cxx0x">C++0x Implementation status</h2>

<p>Clang's development effort is focused primarily on fixing bugs in the current
ISO C++ standard (1998/2003). This section tracks the status of various C++0x
features.</p>


<h2 id="specification">Implementation Status by Feature</h2>


<!-- Within this table: The colors we're using to color-code our level
of support for a given section:

       White (no background): not considered/tested.
       #C11B17: Broken.
       #F88017: Some useful examples work
       #FDD017: Many examples work
       #347C17: Nearly everything works
       #00FF00 + check mark: Implementation complete!
  -->

<p>The following table is used to help track our implementation
  progress toward implementing the complete C++'0x standard. We use a
  simple, somewhat arbitrary color-coding scheme to describe the
  relative completeness of features:</p>

<table width="689" border="1" cellspacing="0">
  <tr>
    <th>Not started/not evaluated</th>
    <th>Not Applicable</th>
    <th>Broken</th>
    <th>Some examples work</th>
    <th>Many examples work</th>
    <th>Nearly everything works</th>
    <th>Complete</th>
    <th>Complete (with tests for each paragraph)</th>
  </tr>
  <tr>
    <td></td>
    <td class="na">N/A</td>
    <td class="broken"></td>
    <td class="basic"></td>
    <td class="medium"></td>
    <td class="advanced"></td>
    <td class="complete"></td>
    <td class="complete" align="center">&#x2713;</td>
  </tr>
</table>

<p>A feature is "complete" when the appropriate Clang component (Parse, AST,
Sema, CodeGen) implements the behavior described in all of the
paragraphs in the relevant C++'0x draft standard.  The major
components are:</p>

<dl>
  <dt>Parse</dt>
  <dd>Clang is able to parse the grammar of this feature (or the grammar
   described by this section), but does not necessarily do anything with the
   parsed result. Use Clang's <code>-fsyntax-only</code> option to parse C++
    programs.</dd>

  <dt>AST</dt>
  <dd>Clang builds an abstract syntax tree (AST) for the feature, but does not
  necessarily perform any type-checking. Use Clang's <code>-ast-print</code>
  option to print the resulting ASTs.</dd>

  <dt>Sema</dt>
  <dd>Clang parses and type-checks this feature and provides a well-formed AST
    annotated with types. Use Clang's <code>-fsyntax-only</code> to type-check
     code.</dd>

  <dt>CodeGen</dt>
  <dd>Clang parses, type-checks, and generates code for this feature, allowing
   one to compile and execute programs.</dd>
</dl>

<p>Updates to this table are welcome!  Tests for the various features are also
welcome!</p>

<table width="689" border="1" cellspacing="0">
<tr><td colspan="6" align="center" bgcolor="#ffffcc">C++0x Features</td>
</tr>
  <tr>
    <th>Feature</th>
    <th>Parse</th>
    <th>AST</th>
    <th>Sema</th>
    <th>CodeGen</th>
    <th>Notes</th>
  </tr>

<tr>
  <td>Explicit conversion operators (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf">N2437</a>)</td>
  <td class="complete" align="center"></td>
  <td class="medium" align="center"></td>
  <td class="advanced" align="center"></td>
  <td class="broken"></td>
  <td>No name mangling; ASTs don't contain calls to conversion operators</td>
</tr>
<tr>
  <td>Static assertions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.pdf">N1720</a>)</td>
  <td class="complete" align="center"></td>
  <td class="complete" align="center"></td>
  <td class="complete" align="center"></td>
  <td class="na">N/A</td>
  <td></td>
</tr>
<tr>
  <td>Deleted functions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a>)</td>
  <td class="complete" align="center"></td>
  <td class="complete" align="center"></td>
  <td class="complete" align="center"></td>
  <td class="na">N/A</td>
  <td></td>
</tr>
<tr>
  <td>Rvalue references (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html">N2118</a> + <a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2831.html">N2831</a>)</td>
  <td class="complete" align="center"></td>
  <td class="complete" align="center"></td>
  <td class="complete" align="center"></td>
  <td class="broken"></td>
  <td></td>
</tr>
<tr>
  <td>nullptr (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">N2431</a>)</td>
  <td class="complete" align="center"></td>
  <td class="complete" align="center"></td>
  <td class="complete" align="center"></td>
  <td class="broken"></td>
  <td></td>
</tr>
<tr>
  <td>Right angle brackets (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html">N1757</a>)</td>
  <td class="complete" align="center"></td>
  <td class="na" align="center">N/A</td>
  <td class="na" align="center">N/A</td>
  <td class="na">N/A</td>
  <td></td>
</tr>
<tr>
  <td>Decltype (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">N2343</a>)</td>
  <td class="complete" align="center">&#x2713;</td>
  <td class="complete" align="center">&#x2713;</td>
  <td class="complete" align="center">&#x2713;</td>
  <td class="na">N/A</td>
  <td></td>
</tr>
</table>
<br />
</div>
</body>
</html>
OpenPOWER on IntegriCloud