2009-02-15 04:20:19 +08:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
2009-02-25 23:22:45 +08:00
|
|
|
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
2010-05-22 04:59:40 +08:00
|
|
|
<title>Clang - C++ and C++'0x Status</title>
|
2009-02-25 23:22:45 +08:00
|
|
|
<link type="text/css" rel="stylesheet" href="menu.css">
|
|
|
|
<link type="text/css" rel="stylesheet" href="content.css">
|
2009-02-15 04:20:19 +08:00
|
|
|
<style type="text/css">
|
2009-05-13 02:36:58 +08:00
|
|
|
.na { background-color: #C0C0C0; text-align: center; }
|
2009-02-15 04:20:19 +08:00
|
|
|
.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">
|
|
|
|
|
|
|
|
<!--*************************************************************************-->
|
2010-05-22 04:59:40 +08:00
|
|
|
<h1>C++ and C++'0x Support in Clang</h1>
|
2009-02-15 04:20:19 +08:00
|
|
|
<!--*************************************************************************-->
|
2009-06-28 03:33:58 +08:00
|
|
|
<p>Last updated: $Date$</p>
|
2009-02-15 04:20:19 +08:00
|
|
|
|
2010-02-06 07:51:14 +08:00
|
|
|
<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>
|
|
|
|
|
2010-05-22 04:59:40 +08:00
|
|
|
<p>Clang currently implements all of the ISO C++ 1998 standard (including
|
2010-05-22 05:16:21 +08:00
|
|
|
the defects addressed in the ISO C++ 2003 standard) except for 'export'
|
|
|
|
(which has been removed from the C++'0x draft).
|
2010-10-11 13:20:49 +08:00
|
|
|
The <a href="http://llvm.org/bugs/">LLVM bug tracker</a>
|
2010-05-22 04:59:40 +08:00
|
|
|
contains a Clang C++ component that tracks known Clang C++ bugs.</p>
|
2010-02-06 07:51:14 +08:00
|
|
|
|
2010-04-13 00:01:38 +08:00
|
|
|
<h2 id="projects">Projects Building with Clang</h2>
|
2010-02-06 07:51:14 +08:00
|
|
|
|
2010-05-22 04:59:40 +08:00
|
|
|
<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>
|
2010-02-06 07:51:14 +08:00
|
|
|
|
|
|
|
<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>
|
2010-02-10 00:36:17 +08:00
|
|
|
<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>
|
2010-05-22 04:59:40 +08:00
|
|
|
<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>
|
2010-08-26 22:20:18 +08:00
|
|
|
<td><a href="http://llvm.org/bugs/show_bug.cgi?id=6023"><del>PR6023</del></a></td>
|
2010-05-22 04:59:40 +08:00
|
|
|
</tr>
|
2010-02-10 00:36:17 +08:00
|
|
|
<tr>
|
2010-02-10 00:50:54 +08:00
|
|
|
<td><a href="http://qt.nokia.com">Qt</a></td>
|
2010-02-10 00:46:25 +08:00
|
|
|
<td>Partially compiles; miscompilation of uic prevents complete compilation, qmake works, some small examples also.</td>
|
2010-02-10 00:36:17 +08:00
|
|
|
<td>February 9, 2010</td>
|
|
|
|
<td><a href="http://llvm.org/bugs/show_bug.cgi?id=5881">PR5881</a></td>
|
|
|
|
</tr>
|
2010-02-06 07:51:14 +08:00
|
|
|
</table>
|
|
|
|
|
2010-05-22 04:59:40 +08:00
|
|
|
<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
|
2010-05-22 05:02:17 +08:00
|
|
|
features.</p>
|
2010-05-22 04:59:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
<h2 id="specification">Implementation Status by Feature</h2>
|
2009-02-15 04:20:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
<!-- 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
|
2010-05-22 04:59:40 +08:00
|
|
|
progress toward implementing the complete C++'0x standard. We use a
|
2009-02-15 04:20:19 +08:00
|
|
|
simple, somewhat arbitrary color-coding scheme to describe the
|
2010-05-22 04:59:40 +08:00
|
|
|
relative completeness of features:</p>
|
2009-02-15 04:20:19 +08:00
|
|
|
|
|
|
|
<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>
|
2009-05-13 01:55:28 +08:00
|
|
|
<th>Complete</th>
|
|
|
|
<th>Complete (with tests for each paragraph)</th>
|
2009-02-15 04:20:19 +08:00
|
|
|
</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>
|
2009-05-13 01:55:28 +08:00
|
|
|
<td class="complete"></td>
|
2009-02-15 04:20:19 +08:00
|
|
|
<td class="complete" align="center">✓</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
|
2010-05-22 04:59:40 +08:00
|
|
|
paragraphs in the relevant C++'0x draft standard. The major
|
|
|
|
components are:</p>
|
2009-02-15 04:20:19 +08:00
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parse</dt>
|
2010-05-22 04:59:40 +08:00
|
|
|
<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>
|
2009-02-15 04:20:19 +08:00
|
|
|
|
|
|
|
<dt>AST</dt>
|
2010-05-22 04:59:40 +08:00
|
|
|
<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>
|
2009-02-15 04:20:19 +08:00
|
|
|
|
|
|
|
<dt>Sema</dt>
|
2010-05-22 04:59:40 +08:00
|
|
|
<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>
|
2009-02-15 04:20:19 +08:00
|
|
|
|
|
|
|
<dt>CodeGen</dt>
|
2010-05-22 04:59:40 +08:00
|
|
|
<dd>Clang parses, type-checks, and generates code for this feature, allowing
|
|
|
|
one to compile and execute programs.</dd>
|
2009-02-15 04:20:19 +08:00
|
|
|
</dl>
|
|
|
|
|
2010-05-22 04:59:40 +08:00
|
|
|
<p>Updates to this table are welcome! Tests for the various features are also
|
2009-02-15 04:20:19 +08:00
|
|
|
welcome!</p>
|
|
|
|
|
|
|
|
<table width="689" border="1" cellspacing="0">
|
2010-05-22 04:59:40 +08:00
|
|
|
<tr><td colspan="6" align="center" bgcolor="#ffffcc">C++0x Features</td>
|
|
|
|
</tr>
|
2009-02-15 04:20:19 +08:00
|
|
|
<tr>
|
2010-05-22 04:59:40 +08:00
|
|
|
<th>Feature</th>
|
2009-02-15 04:20:19 +08:00
|
|
|
<th>Parse</th>
|
|
|
|
<th>AST</th>
|
|
|
|
<th>Sema</th>
|
|
|
|
<th>CodeGen</th>
|
|
|
|
<th>Notes</th>
|
|
|
|
</tr>
|
2010-02-06 07:51:14 +08:00
|
|
|
|
2009-05-11 02:38:11 +08:00
|
|
|
<tr>
|
2009-02-15 04:20:19 +08:00
|
|
|
<td>Explicit conversion operators (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf">N2437</a>)</td>
|
2009-05-13 01:55:28 +08:00
|
|
|
<td class="complete" align="center"></td>
|
2010-09-18 05:37:49 +08:00
|
|
|
<td class="basic" align="center"></td>
|
|
|
|
<td class="basic" align="center"></td>
|
2009-02-15 04:20:19 +08:00
|
|
|
<td class="broken"></td>
|
|
|
|
<td>No name mangling; ASTs don't contain calls to conversion operators</td>
|
2009-05-11 02:38:11 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2009-03-17 01:28:26 +08:00
|
|
|
<td>Static assertions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.pdf">N1720</a>)</td>
|
2009-05-13 01:55:28 +08:00
|
|
|
<td class="complete" align="center"></td>
|
|
|
|
<td class="complete" align="center"></td>
|
2010-09-18 05:37:49 +08:00
|
|
|
<td class="advanced" align="center"></td>
|
2009-03-17 01:28:26 +08:00
|
|
|
<td class="na">N/A</td>
|
|
|
|
<td></td>
|
2009-05-11 02:38:11 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2009-04-13 01:41:24 +08:00
|
|
|
<td>Deleted functions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a>)</td>
|
2009-05-13 01:55:28 +08:00
|
|
|
<td class="complete" align="center"></td>
|
|
|
|
<td class="complete" align="center"></td>
|
2010-09-18 05:37:49 +08:00
|
|
|
<td class="medium" align="center"></td>
|
2009-04-13 01:41:24 +08:00
|
|
|
<td class="na">N/A</td>
|
|
|
|
<td></td>
|
2009-05-11 02:38:11 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2009-04-13 01:41:24 +08:00
|
|
|
<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>
|
2009-05-13 01:55:28 +08:00
|
|
|
<td class="complete" align="center"></td>
|
|
|
|
<td class="complete" align="center"></td>
|
2010-09-18 05:37:49 +08:00
|
|
|
<td class="broken" align="center"></td>
|
2009-04-13 01:41:24 +08:00
|
|
|
<td class="broken"></td>
|
|
|
|
<td></td>
|
2009-05-11 02:38:11 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>nullptr (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">N2431</a>)</td>
|
2009-05-13 01:55:28 +08:00
|
|
|
<td class="complete" align="center"></td>
|
|
|
|
<td class="complete" align="center"></td>
|
2010-09-18 05:37:49 +08:00
|
|
|
<td class="medium" align="center"></td>
|
2009-05-11 02:38:11 +08:00
|
|
|
<td class="broken"></td>
|
|
|
|
<td></td>
|
2009-02-15 04:20:19 +08:00
|
|
|
</tr>
|
2009-06-16 00:50:45 +08:00
|
|
|
<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>
|
2009-06-25 06:10:19 +08:00
|
|
|
<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">✓</td>
|
|
|
|
<td class="complete" align="center">✓</td>
|
2010-09-18 05:37:49 +08:00
|
|
|
<td class="advanced" align="center"></td>
|
|
|
|
<td class="na">N/A</td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>noexcept (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html">N3050</a>)</td>
|
|
|
|
<td class="complete" align="center">✓</td>
|
|
|
|
<td class="complete" align="center">✓</td>
|
2009-06-25 06:10:19 +08:00
|
|
|
<td class="complete" align="center">✓</td>
|
|
|
|
<td class="na">N/A</td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
2010-09-18 05:37:49 +08:00
|
|
|
<tr>
|
|
|
|
<td>Inline namespaces (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm">N2535</a>)</td>
|
|
|
|
<td class="complete" align="center">✓</td>
|
|
|
|
<td class="complete" align="center">✓</td>
|
|
|
|
<td class="complete" align="center">✓</td>
|
|
|
|
<td class="complete" align="center">N/A</td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
2009-02-15 04:20:19 +08:00
|
|
|
</table>
|
2009-05-13 02:36:58 +08:00
|
|
|
<br />
|
2009-02-15 04:20:19 +08:00
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|