C++ Support in Clang

This page tracks the status of C++ support in Clang.
Currently most of the C++ features are missing; here you can find features that are at least partially supported in Clang.

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.

Feature

Example

Status

Bool type bool x; Full support.
wchar_t type wchar_t x; Parser and Sema support in, partial Codegen support.
Named Casts static_cast<int>(x) Partial Parser and Sema support, no codegen.
References int &x = ...; Parser and Sema support in, partial Codegen support.
Default arguments void f(int x=0); Full support.
Namespaces namespace A {
   int x;
}
Parser and Sema support in, no Codegen support.
Class definitions class C {
public:
   int getX() { return x; }
private:
   int x;
};
Partial Parser and Sema support, no Codegen support.