2008-07-02 15:38:59 +04:00
|
|
|
<!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" />
|
2008-07-02 17:44:11 +04:00
|
|
|
<title>Clang - C++ Support</title>
|
2008-07-02 15:38:59 +04:00
|
|
|
<link type="text/css" rel="stylesheet" href="menu.css" />
|
|
|
|
<link type="text/css" rel="stylesheet" href="content.css" />
|
|
|
|
<style type="text/css">
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<!--#include virtual="menu.html.incl"-->
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
|
|
|
<!--*************************************************************************-->
|
|
|
|
<h1>C++ Support in Clang</h1>
|
|
|
|
<!--*************************************************************************-->
|
|
|
|
|
|
|
|
<p>
|
2008-07-02 19:10:46 +04:00
|
|
|
This page tracks the status of C++ support in Clang.<br>
|
|
|
|
Currently most of the C++ features are missing; here you can find features that are at least partially supported in Clang. </p>
|
2008-07-02 20:28:43 +04:00
|
|
|
|
|
|
|
<p>
|
|
|
|
In this table, parser support means that the parser knows the grammar for
|
|
|
|
the feature. "Sema" support means that we do type checking, report errors
|
|
|
|
about misuses of the feature and build an AST. CodeGen support means that we
|
|
|
|
actually produce LLVM code for the feature with the -emit-llvm option.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<table width="689" border="1" cellspacing="0">
|
2008-07-02 15:38:59 +04:00
|
|
|
<tr>
|
|
|
|
<td width="150"><h3>Feature</h3></td>
|
|
|
|
<td width="172"><h3>Example</h3></td>
|
|
|
|
<td width="345"><h3>Status</h3></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2008-07-03 12:32:59 +04:00
|
|
|
<td>Bool type </td>
|
|
|
|
<td>bool x; </td>
|
2008-07-02 15:38:59 +04:00
|
|
|
<td>Full support.</td>
|
|
|
|
</tr>
|
2008-07-02 20:28:43 +04:00
|
|
|
<tr>
|
|
|
|
<td>Named Casts </td>
|
|
|
|
<td>static_cast<int>(x)</td>
|
2008-07-03 12:32:59 +04:00
|
|
|
<td>Partial Parser and Sema support, no codegen.</td>
|
2008-07-02 20:28:43 +04:00
|
|
|
</tr>
|
2008-07-02 15:38:59 +04:00
|
|
|
<tr>
|
2008-07-02 18:16:29 +04:00
|
|
|
<td>References</td>
|
2008-07-02 15:38:59 +04:00
|
|
|
<td>int &x = ...;</td>
|
2008-07-02 16:34:47 +04:00
|
|
|
<td>Parser and Sema support in, partial Codegen support.</td>
|
2008-07-02 15:38:59 +04:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2008-07-02 18:16:29 +04:00
|
|
|
<td>Default arguments </td>
|
2008-07-02 15:38:59 +04:00
|
|
|
<td>void f(int x=0); </td>
|
|
|
|
<td>Full support. </td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2008-07-02 18:16:29 +04:00
|
|
|
<td>Namespaces</td>
|
2008-07-02 15:38:59 +04:00
|
|
|
<td>namespace A {<br/>
|
|
|
|
int x;<br/>
|
|
|
|
}</td>
|
2008-07-02 16:34:47 +04:00
|
|
|
<td>Parser and Sema support in, no Codegen support.</td>
|
2008-07-02 15:38:59 +04:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2008-07-02 18:16:29 +04:00
|
|
|
<td>Class definitions</td>
|
2008-07-02 15:38:59 +04:00
|
|
|
<td>class C {<br/>
|
|
|
|
public:<br/>
|
|
|
|
int getX() { return x; }<br/>
|
|
|
|
private:<br/>
|
|
|
|
int x;<br/>
|
|
|
|
};</td>
|
2008-07-02 16:34:47 +04:00
|
|
|
<td>Partial Parser and Sema support, no Codegen support.</td>
|
2008-07-02 15:38:59 +04:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|