[cfe-dev] clang C++ volunteer
Bill Wendling
isanbard at gmail.com
Thu Sep 6 21:01:51 PDT 2007
On Sep 6, 2007, at 4:57 AM, Justin Handville wrote:
>> The C++ support is in an *extremely* early phase right now. There's
>> only named operators, bool, parsing for C++ casts, and references in
>> there right now. Some of the things to be done with the C++ casts and
>> references are:
>>
>> - Do semantic analysis for reference initialization.
>> - Do semantic analysis for casts.
>>
>> There's obviously a lot more to do. I would suggest taking small
>> steps; learning the code base and its architecture by adding smaller
>> features of the language. As far as a specific list of items, there
>> isn't any official one. Though I'd start with the two I mentioned
>> above (I have some code for the second of those, if you'd like to see
>> it) and proceed from there.
>
> Yes, I would be interested in seeing what you have so far to implement
> semantic analysis for casts. I'll start digging into the code base
> tonight to see how the AST is implemented.
Hi Justin,
Here's what I have so far for the C++ cast checking. Notice that the
concept of "casting away constness" is not equivalent to checking
that the const_cast operator is validly applied. It's a concept
that's explain in the same section of the standard as the const_cast
operator, though. The reinterpret_cast should be complete. The
const_cast has a few more checks that need to be added to it. The
static and dynamic casts are still undone (though dynamic_cast will
have to wait until inheritance is supported).
Let me know if you have questions about the code!
-bw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cxx-cast.patch
Type: application/octet-stream
Size: 21819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20070906/29f2643e/attachment.obj>
-------------- next part --------------
More information about the cfe-dev
mailing list