[cfe-dev] C++ Parser

Chris Lattner clattner at apple.com
Sun Feb 10 12:25:18 PST 2008


On Feb 10, 2008, at 12:12 PM, Kevin Tew wrote:

> I'm interested in working on the C++ parser for clang.
>
> I was wondering how the sharing between the C and C++ parser was being
> envisioned?
>
> Should the C++ parser inherit from the C parser class or is the C++
> parser just going to be a different entry point function of the  
> already
> existing C parser?

They are fully integrated with each other, and use the LangOptions  
properties to enable or disable various language features.  This is  
how we handle C90 and C99 for example, as well.

There is some basic C++ support in clang already (e.g. bool,  
references, etc) you can see how those are implemented if interested.

-Chris



More information about the cfe-dev mailing list