Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +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>
|
| 5 | <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
Argyrios Kyrtzidis | 682f77b | 2008-07-02 13:44:11 +0000 | [diff] [blame] | 6 | <title>Clang - C++ Support</title>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 7 | <link type="text/css" rel="stylesheet" href="menu.css" />
|
| 8 | <link type="text/css" rel="stylesheet" href="content.css" />
|
| 9 | <style type="text/css">
|
| 10 | </style>
|
| 11 | </head>
|
| 12 | <body>
|
| 13 |
|
| 14 | <!--#include virtual="menu.html.incl"-->
|
| 15 |
|
| 16 | <div id="content">
|
| 17 |
|
| 18 | <!--*************************************************************************-->
|
| 19 | <h1>C++ Support in Clang</h1>
|
| 20 | <!--*************************************************************************-->
|
| 21 |
|
| 22 | <p>
|
Argyrios Kyrtzidis | b1ca793 | 2008-07-02 15:10:46 +0000 | [diff] [blame] | 23 | This page tracks the status of C++ support in Clang.<br>
|
| 24 | Currently most of the C++ features are missing; here you can find features that are at least partially supported in Clang. </p>
|
Chris Lattner | cdbd0a0 | 2008-07-02 16:28:43 +0000 | [diff] [blame] | 25 |
|
| 26 | <p>
|
| 27 | In this table, parser support means that the parser knows the grammar for
|
| 28 | the feature. "Sema" support means that we do type checking, report errors
|
| 29 | about misuses of the feature and build an AST. CodeGen support means that we
|
| 30 | actually produce LLVM code for the feature with the -emit-llvm option.
|
| 31 | </p>
|
| 32 |
|
| 33 | <table width="689" border="1" cellspacing="0">
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 34 | <tr>
|
| 35 | <td width="150"><h3>Feature</h3></td>
|
| 36 | <td width="172"><h3>Example</h3></td>
|
| 37 | <td width="345"><h3>Status</h3></td>
|
| 38 | </tr>
|
| 39 | <tr>
|
Argyrios Kyrtzidis | 6768980 | 2008-07-03 08:32:59 +0000 | [diff] [blame] | 40 | <td>Bool type </td>
|
| 41 | <td>bool x; </td>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 42 | <td>Full support.</td>
|
| 43 | </tr>
|
| 44 | <tr>
|
Argyrios Kyrtzidis | cd33b85 | 2008-08-09 22:12:36 +0000 | [diff] [blame] | 45 | <td>wchar_t type </td>
|
| 46 | <td>wchar_t x; </td>
|
| 47 | <td>Parser and Sema support in, partial Codegen support.</td>
|
| 48 | </tr>
|
| 49 | <tr>
|
Chris Lattner | cdbd0a0 | 2008-07-02 16:28:43 +0000 | [diff] [blame] | 50 | <td>Named Casts </td>
|
| 51 | <td>static_cast<int>(x)</td>
|
Argyrios Kyrtzidis | 6768980 | 2008-07-03 08:32:59 +0000 | [diff] [blame] | 52 | <td>Partial Parser and Sema support, no codegen.</td>
|
Chris Lattner | cdbd0a0 | 2008-07-02 16:28:43 +0000 | [diff] [blame] | 53 | </tr>
|
| 54 | <tr>
|
Argyrios Kyrtzidis | be5a105 | 2008-07-02 14:16:29 +0000 | [diff] [blame] | 55 | <td>References</td>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 56 | <td>int &x = ...;</td>
|
Gabor Greif | 1323480 | 2008-07-02 12:34:47 +0000 | [diff] [blame] | 57 | <td>Parser and Sema support in, partial Codegen support.</td>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 58 | </tr>
|
| 59 | <tr>
|
Argyrios Kyrtzidis | be5a105 | 2008-07-02 14:16:29 +0000 | [diff] [blame] | 60 | <td>Default arguments </td>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 61 | <td>void f(int x=0); </td>
|
| 62 | <td>Full support. </td>
|
| 63 | </tr>
|
| 64 | <tr>
|
Argyrios Kyrtzidis | be5a105 | 2008-07-02 14:16:29 +0000 | [diff] [blame] | 65 | <td>Namespaces</td>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 66 | <td>namespace A {<br/>
|
| 67 | int x;<br/>
|
| 68 | }</td>
|
Gabor Greif | 1323480 | 2008-07-02 12:34:47 +0000 | [diff] [blame] | 69 | <td>Parser and Sema support in, no Codegen support.</td>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 70 | </tr>
|
| 71 | <tr>
|
Argyrios Kyrtzidis | be5a105 | 2008-07-02 14:16:29 +0000 | [diff] [blame] | 72 | <td>Class definitions</td>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 73 | <td>class C {<br/>
|
| 74 | public:<br/>
|
| 75 | int getX() { return x; }<br/>
|
| 76 | private:<br/>
|
| 77 | int x;<br/>
|
| 78 | };</td>
|
Gabor Greif | 1323480 | 2008-07-02 12:34:47 +0000 | [diff] [blame] | 79 | <td>Partial Parser and Sema support, no Codegen support.</td>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 80 | </tr>
|
Argyrios Kyrtzidis | 84b7a80 | 2008-07-02 11:38:59 +0000 | [diff] [blame] | 81 | </table>
|
| 82 | </div>
|
| 83 | </body>
|
| 84 | </html>
|