blob: c757e06d3f6408aa1c320c66a10f3f696a69a954 [file] [log] [blame]
<!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$</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>