[CastXML] Extent of language support?

Brad King brad.king at kitware.com
Tue Jul 28 09:07:47 EDT 2015


On 07/27/2015 07:43 PM, NIkolai Marchenko wrote:
> what it the current status of support for C++11? 
> 
> For example - does it parse variadics, trailing return types?
> What happens if it meets a macro in a file that is defined somewhere else? 

CastXML is based on Clang (clang.llvm.org) so its parser is a full compiler.
It operates on an entire translation unit preprocessed just as a compiler
would (and so needs to be given a .cxx file and not just any .h file).
Clang supports C++11, so CastXML can parse such translation units as well
as Clang can.

However, CastXML's output format is currently that of gccxml's as it is
meant to succeed that tool while requiring little effort to port its
clients.  The output format does not support C++11 constructs like rvalue
references.  When operating with -std=c++11, CastXML will parse as C++11
but only output the C++98 subset of the declarations encountered.

CastXML, like gccxml, doesn't dump uninstantiated templates but will
output descriptions of any instantiations of templates encountered.

-Brad



More information about the CastXML mailing list