Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +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> |
Gabor Greif | 70f2a04 | 2009-02-25 15:22:45 +0000 | [diff] [blame] | 5 | <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 6 | <title>Clang - C++ and C++'0x Status</title> |
Gabor Greif | 70f2a04 | 2009-02-25 15:22:45 +0000 | [diff] [blame] | 7 | <link type="text/css" rel="stylesheet" href="menu.css"> |
| 8 | <link type="text/css" rel="stylesheet" href="content.css"> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 9 | <style type="text/css"> |
Douglas Gregor | 01cf112 | 2009-05-12 18:36:58 +0000 | [diff] [blame] | 10 | .na { background-color: #C0C0C0; text-align: center; } |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 11 | .broken { background-color: #C11B17 } |
| 12 | .basic { background-color: #F88017 } |
| 13 | .medium { background-color: #FDD017 } |
| 14 | .advanced { background-color: #347C17 } |
| 15 | .complete { background-color: #00FF00 } |
| 16 | </style> |
| 17 | </head> |
| 18 | <body> |
| 19 | |
| 20 | <!--#include virtual="menu.html.incl"--> |
| 21 | |
| 22 | <div id="content"> |
| 23 | |
| 24 | <!--*************************************************************************--> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 25 | <h1>C++ and C++'0x Support in Clang</h1> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 26 | <!--*************************************************************************--> |
Douglas Gregor | 4c9b68f | 2009-06-27 19:33:58 +0000 | [diff] [blame] | 27 | <p>Last updated: $Date$</p> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 28 | |
Douglas Gregor | 57f1a00 | 2010-02-05 23:51:14 +0000 | [diff] [blame] | 29 | <ul> |
| 30 | <li><a href="#projects">Projects Building with Clang</a></li> |
| 31 | <li><a href="#specification">Implementation Status by Section</a></li> |
| 32 | <li><a href="#cxx0x">C++0x Status</a></li> |
| 33 | </ul> |
| 34 | |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 35 | <p>Clang currently implements all of the ISO C++ 1998 standard (including |
Chris Lattner | d3573f0 | 2010-05-21 21:16:21 +0000 | [diff] [blame] | 36 | the defects addressed in the ISO C++ 2003 standard) except for 'export' |
| 37 | (which has been removed from the C++'0x draft). |
Chris Lattner | b7579aa | 2010-10-11 05:20:49 +0000 | [diff] [blame^] | 38 | The <a href="http://llvm.org/bugs/">LLVM bug tracker</a> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 39 | contains a Clang C++ component that tracks known Clang C++ bugs.</p> |
Douglas Gregor | 57f1a00 | 2010-02-05 23:51:14 +0000 | [diff] [blame] | 40 | |
Douglas Gregor | 15f2e72 | 2010-04-12 16:01:38 +0000 | [diff] [blame] | 41 | <h2 id="projects">Projects Building with Clang</h2> |
Douglas Gregor | 57f1a00 | 2010-02-05 23:51:14 +0000 | [diff] [blame] | 42 | |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 43 | <p>Clang is now capable of compiling large C++ projects, and the following |
| 44 | table describes various projects that we have attempted to compile with |
| 45 | Clang++.</p> |
Douglas Gregor | 57f1a00 | 2010-02-05 23:51:14 +0000 | [diff] [blame] | 46 | |
| 47 | <table width="689" border="1" cellspacing="0"> |
| 48 | <tr> |
| 49 | <th>Project</th> |
| 50 | <th>Status</th> |
| 51 | <th>Last Tested</th> |
| 52 | <th>Tracking Bug</th> |
| 53 | </tr> |
| 54 | <tr> |
| 55 | <td><a href="http://clang.llvm.org">Clang</a> and <a href="http://llvm.org">LLVM</a></td> |
| 56 | <td>Successful self-hosting achieved</td> |
| 57 | <td>Continually</td> |
| 58 | <td></td> |
| 59 | </tr> |
| 60 | <tr> |
Douglas Gregor | 95e636c | 2010-02-09 16:36:17 +0000 | [diff] [blame] | 61 | <td><a href="http://www.cmake.org">CMake</a></td> |
| 62 | <td>Compiles, passes regression tests (debug build)</td> |
| 63 | <td>February 9, 2010</td> |
| 64 | <td></td> |
| 65 | </tr> |
| 66 | <tr> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 67 | <td><a href="http://www.boost.org">Boost</a></td> |
| 68 | <td><a href="http://blog.llvm.org/2010/05/clang-builds-boost.html">Compiles |
| 69 | and passes regression tests</a> on Darwin/X86-64.</td> |
| 70 | <td>May 20, 2010</td> |
Gabor Greif | 0ca08af | 2010-08-26 14:20:18 +0000 | [diff] [blame] | 71 | <td><a href="http://llvm.org/bugs/show_bug.cgi?id=6023"><del>PR6023</del></a></td> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 72 | </tr> |
| 73 | <tr> |
Anton Korobeynikov | 555d04f | 2010-02-09 16:50:54 +0000 | [diff] [blame] | 74 | <td><a href="http://qt.nokia.com">Qt</a></td> |
Anton Korobeynikov | 0488124 | 2010-02-09 16:46:25 +0000 | [diff] [blame] | 75 | <td>Partially compiles; miscompilation of uic prevents complete compilation, qmake works, some small examples also.</td> |
Douglas Gregor | 95e636c | 2010-02-09 16:36:17 +0000 | [diff] [blame] | 76 | <td>February 9, 2010</td> |
| 77 | <td><a href="http://llvm.org/bugs/show_bug.cgi?id=5881">PR5881</a></td> |
| 78 | </tr> |
Douglas Gregor | 57f1a00 | 2010-02-05 23:51:14 +0000 | [diff] [blame] | 79 | </table> |
| 80 | |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 81 | <h2 id="cxx0x">C++0x Implementation status</h2> |
| 82 | |
| 83 | <p>Clang's development effort is focused primarily on fixing bugs in the current |
| 84 | ISO C++ standard (1998/2003). This section tracks the status of various C++0x |
Chris Lattner | a4b46cc | 2010-05-21 21:02:17 +0000 | [diff] [blame] | 85 | features.</p> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 86 | |
| 87 | |
| 88 | <h2 id="specification">Implementation Status by Feature</h2> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 89 | |
| 90 | |
| 91 | <!-- Within this table: The colors we're using to color-code our level |
| 92 | of support for a given section: |
| 93 | |
| 94 | White (no background): not considered/tested. |
| 95 | #C11B17: Broken. |
| 96 | #F88017: Some useful examples work |
| 97 | #FDD017: Many examples work |
| 98 | #347C17: Nearly everything works |
| 99 | #00FF00 + check mark: Implementation complete! |
| 100 | --> |
| 101 | |
| 102 | <p>The following table is used to help track our implementation |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 103 | progress toward implementing the complete C++'0x standard. We use a |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 104 | simple, somewhat arbitrary color-coding scheme to describe the |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 105 | relative completeness of features:</p> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 106 | |
| 107 | <table width="689" border="1" cellspacing="0"> |
| 108 | <tr> |
| 109 | <th>Not started/not evaluated</th> |
| 110 | <th>Not Applicable</th> |
| 111 | <th>Broken</th> |
| 112 | <th>Some examples work</th> |
| 113 | <th>Many examples work</th> |
| 114 | <th>Nearly everything works</th> |
Douglas Gregor | 0755402 | 2009-05-12 17:55:28 +0000 | [diff] [blame] | 115 | <th>Complete</th> |
| 116 | <th>Complete (with tests for each paragraph)</th> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 117 | </tr> |
| 118 | <tr> |
| 119 | <td></td> |
| 120 | <td class="na">N/A</td> |
| 121 | <td class="broken"></td> |
| 122 | <td class="basic"></td> |
| 123 | <td class="medium"></td> |
| 124 | <td class="advanced"></td> |
Douglas Gregor | 0755402 | 2009-05-12 17:55:28 +0000 | [diff] [blame] | 125 | <td class="complete"></td> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 126 | <td class="complete" align="center">✓</td> |
| 127 | </tr> |
| 128 | </table> |
| 129 | |
| 130 | <p>A feature is "complete" when the appropriate Clang component (Parse, AST, |
| 131 | Sema, CodeGen) implements the behavior described in all of the |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 132 | paragraphs in the relevant C++'0x draft standard. The major |
| 133 | components are:</p> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 134 | |
| 135 | <dl> |
| 136 | <dt>Parse</dt> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 137 | <dd>Clang is able to parse the grammar of this feature (or the grammar |
| 138 | described by this section), but does not necessarily do anything with the |
| 139 | parsed result. Use Clang's <code>-fsyntax-only</code> option to parse C++ |
| 140 | programs.</dd> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 141 | |
| 142 | <dt>AST</dt> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 143 | <dd>Clang builds an abstract syntax tree (AST) for the feature, but does not |
| 144 | necessarily perform any type-checking. Use Clang's <code>-ast-print</code> |
| 145 | option to print the resulting ASTs.</dd> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 146 | |
| 147 | <dt>Sema</dt> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 148 | <dd>Clang parses and type-checks this feature and provides a well-formed AST |
| 149 | annotated with types. Use Clang's <code>-fsyntax-only</code> to type-check |
| 150 | code.</dd> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 151 | |
| 152 | <dt>CodeGen</dt> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 153 | <dd>Clang parses, type-checks, and generates code for this feature, allowing |
| 154 | one to compile and execute programs.</dd> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 155 | </dl> |
| 156 | |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 157 | <p>Updates to this table are welcome! Tests for the various features are also |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 158 | welcome!</p> |
| 159 | |
| 160 | <table width="689" border="1" cellspacing="0"> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 161 | <tr><td colspan="6" align="center" bgcolor="#ffffcc">C++0x Features</td> |
| 162 | </tr> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 163 | <tr> |
Chris Lattner | 900e32d | 2010-05-21 20:59:40 +0000 | [diff] [blame] | 164 | <th>Feature</th> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 165 | <th>Parse</th> |
| 166 | <th>AST</th> |
| 167 | <th>Sema</th> |
| 168 | <th>CodeGen</th> |
| 169 | <th>Notes</th> |
| 170 | </tr> |
Douglas Gregor | 6d507a6 | 2009-05-07 17:50:16 +0000 | [diff] [blame] | 171 | |
Sebastian Redl | 6e8ed16 | 2009-05-10 18:38:11 +0000 | [diff] [blame] | 172 | <tr> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 173 | <td>Explicit conversion operators (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf">N2437</a>)</td> |
Douglas Gregor | 0755402 | 2009-05-12 17:55:28 +0000 | [diff] [blame] | 174 | <td class="complete" align="center"></td> |
Douglas Gregor | 28f0396 | 2010-09-17 21:37:49 +0000 | [diff] [blame] | 175 | <td class="basic" align="center"></td> |
| 176 | <td class="basic" align="center"></td> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 177 | <td class="broken"></td> |
| 178 | <td>No name mangling; ASTs don't contain calls to conversion operators</td> |
Sebastian Redl | 6e8ed16 | 2009-05-10 18:38:11 +0000 | [diff] [blame] | 179 | </tr> |
| 180 | <tr> |
Anders Carlsson | c31a0ce | 2009-03-16 17:28:26 +0000 | [diff] [blame] | 181 | <td>Static assertions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.pdf">N1720</a>)</td> |
Douglas Gregor | 0755402 | 2009-05-12 17:55:28 +0000 | [diff] [blame] | 182 | <td class="complete" align="center"></td> |
| 183 | <td class="complete" align="center"></td> |
Douglas Gregor | 28f0396 | 2010-09-17 21:37:49 +0000 | [diff] [blame] | 184 | <td class="advanced" align="center"></td> |
Anders Carlsson | c31a0ce | 2009-03-16 17:28:26 +0000 | [diff] [blame] | 185 | <td class="na">N/A</td> |
| 186 | <td></td> |
Sebastian Redl | 6e8ed16 | 2009-05-10 18:38:11 +0000 | [diff] [blame] | 187 | </tr> |
| 188 | <tr> |
Sebastian Redl | 0b5e7fb | 2009-04-12 17:41:24 +0000 | [diff] [blame] | 189 | <td>Deleted functions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a>)</td> |
Douglas Gregor | 0755402 | 2009-05-12 17:55:28 +0000 | [diff] [blame] | 190 | <td class="complete" align="center"></td> |
| 191 | <td class="complete" align="center"></td> |
Douglas Gregor | 28f0396 | 2010-09-17 21:37:49 +0000 | [diff] [blame] | 192 | <td class="medium" align="center"></td> |
Sebastian Redl | 0b5e7fb | 2009-04-12 17:41:24 +0000 | [diff] [blame] | 193 | <td class="na">N/A</td> |
| 194 | <td></td> |
Sebastian Redl | 6e8ed16 | 2009-05-10 18:38:11 +0000 | [diff] [blame] | 195 | </tr> |
| 196 | <tr> |
Sebastian Redl | 0b5e7fb | 2009-04-12 17:41:24 +0000 | [diff] [blame] | 197 | <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> |
Douglas Gregor | 0755402 | 2009-05-12 17:55:28 +0000 | [diff] [blame] | 198 | <td class="complete" align="center"></td> |
| 199 | <td class="complete" align="center"></td> |
Douglas Gregor | 28f0396 | 2010-09-17 21:37:49 +0000 | [diff] [blame] | 200 | <td class="broken" align="center"></td> |
Sebastian Redl | 0b5e7fb | 2009-04-12 17:41:24 +0000 | [diff] [blame] | 201 | <td class="broken"></td> |
| 202 | <td></td> |
Sebastian Redl | 6e8ed16 | 2009-05-10 18:38:11 +0000 | [diff] [blame] | 203 | </tr> |
| 204 | <tr> |
| 205 | <td>nullptr (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">N2431</a>)</td> |
Douglas Gregor | 0755402 | 2009-05-12 17:55:28 +0000 | [diff] [blame] | 206 | <td class="complete" align="center"></td> |
| 207 | <td class="complete" align="center"></td> |
Douglas Gregor | 28f0396 | 2010-09-17 21:37:49 +0000 | [diff] [blame] | 208 | <td class="medium" align="center"></td> |
Sebastian Redl | 6e8ed16 | 2009-05-10 18:38:11 +0000 | [diff] [blame] | 209 | <td class="broken"></td> |
| 210 | <td></td> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 211 | </tr> |
Douglas Gregor | 7420c2d | 2009-06-15 16:50:45 +0000 | [diff] [blame] | 212 | <tr> |
| 213 | <td>Right angle brackets (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html">N1757</a>)</td> |
| 214 | <td class="complete" align="center"></td> |
| 215 | <td class="na" align="center">N/A</td> |
| 216 | <td class="na" align="center">N/A</td> |
| 217 | <td class="na">N/A</td> |
| 218 | <td></td> |
| 219 | </tr> |
Anders Carlsson | 3eb43a0 | 2009-06-24 22:10:19 +0000 | [diff] [blame] | 220 | <tr> |
| 221 | <td>Decltype (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">N2343</a>)</td> |
| 222 | <td class="complete" align="center">✓</td> |
| 223 | <td class="complete" align="center">✓</td> |
Douglas Gregor | 28f0396 | 2010-09-17 21:37:49 +0000 | [diff] [blame] | 224 | <td class="advanced" align="center"></td> |
| 225 | <td class="na">N/A</td> |
| 226 | <td></td> |
| 227 | </tr> |
| 228 | <tr> |
| 229 | <td>noexcept (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html">N3050</a>)</td> |
| 230 | <td class="complete" align="center">✓</td> |
| 231 | <td class="complete" align="center">✓</td> |
Anders Carlsson | 3eb43a0 | 2009-06-24 22:10:19 +0000 | [diff] [blame] | 232 | <td class="complete" align="center">✓</td> |
| 233 | <td class="na">N/A</td> |
| 234 | <td></td> |
| 235 | </tr> |
Douglas Gregor | 28f0396 | 2010-09-17 21:37:49 +0000 | [diff] [blame] | 236 | <tr> |
| 237 | <td>Inline namespaces (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm">N2535</a>)</td> |
| 238 | <td class="complete" align="center">✓</td> |
| 239 | <td class="complete" align="center">✓</td> |
| 240 | <td class="complete" align="center">✓</td> |
| 241 | <td class="complete" align="center">N/A</td> |
| 242 | <td></td> |
| 243 | </tr> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 244 | </table> |
Douglas Gregor | 01cf112 | 2009-05-12 18:36:58 +0000 | [diff] [blame] | 245 | <br /> |
Cedric Venet | 3d65864 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 246 | </div> |
| 247 | </body> |
| 248 | </html> |