blob: 9e154aa0bf22b3b06a75d07f114e9c8acef17a16 [file] [log] [blame]
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +00001<!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 Kyrtzidis682f77b2008-07-02 13:44:11 +00006 <title>Clang - C++ Support</title>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +00007 <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 Kyrtzidisb1ca7932008-07-02 15:10:46 +000023This page tracks the status of C++ support in Clang.<br>
24Currently most of the C++ features are missing; here you can find features that are at least partially supported in Clang. </p>
Chris Lattnercdbd0a02008-07-02 16:28:43 +000025
26<p>
27In this table, parser support means that the parser knows the grammar for
28the feature. "Sema" support means that we do type checking, report errors
29about misuses of the feature and build an AST. CodeGen support means that we
30actually produce LLVM code for the feature with the -emit-llvm option.
31</p>
32
33<table width="689" border="1" cellspacing="0">
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000034 <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 Kyrtzidis67689802008-07-03 08:32:59 +000040 <td>Bool type </td>
41 <td>bool x; </td>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000042 <td>Full support.</td>
43 </tr>
44 <tr>
Argyrios Kyrtzidiscd33b852008-08-09 22:12:36 +000045 <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 Lattnercdbd0a02008-07-02 16:28:43 +000050 <td>Named Casts </td>
51 <td>static_cast&lt;int&gt;(x)</td>
Argyrios Kyrtzidis67689802008-07-03 08:32:59 +000052 <td>Partial Parser and Sema support, no codegen.</td>
Chris Lattnercdbd0a02008-07-02 16:28:43 +000053 </tr>
54 <tr>
Argyrios Kyrtzidisbe5a1052008-07-02 14:16:29 +000055 <td>References</td>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000056 <td>int &amp;x = ...;</td>
Gabor Greif13234802008-07-02 12:34:47 +000057 <td>Parser and Sema support in, partial Codegen support.</td>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000058 </tr>
59 <tr>
Argyrios Kyrtzidisbe5a1052008-07-02 14:16:29 +000060 <td>Default arguments </td>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000061 <td>void f(int x=0); </td>
62 <td>Full support. </td>
63 </tr>
64 <tr>
Argyrios Kyrtzidisbe5a1052008-07-02 14:16:29 +000065 <td>Namespaces</td>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000066 <td>namespace A {<br/>
67 &nbsp;&nbsp;&nbsp;int x;<br/>
68 }</td>
Gabor Greif13234802008-07-02 12:34:47 +000069 <td>Parser and Sema support in, no Codegen support.</td>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000070 </tr>
71 <tr>
Argyrios Kyrtzidisbe5a1052008-07-02 14:16:29 +000072 <td>Class definitions</td>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000073 <td>class C {<br/>
74 public:<br/>
75 &nbsp;&nbsp;&nbsp;int getX() { return x; }<br/>
76 private:<br/>
77 &nbsp;&nbsp;&nbsp;int x;<br/>
78 };</td>
Gabor Greif13234802008-07-02 12:34:47 +000079 <td>Partial Parser and Sema support, no Codegen support.</td>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000080 </tr>
Argyrios Kyrtzidis84b7a802008-07-02 11:38:59 +000081</table>
82</div>
83</body>
84</html>