[cfe-dev] [PATCH] Function-style casting
Chris Lattner
clattner at apple.com
Thu Aug 21 23:55:14 PDT 2008
On Aug 18, 2008, at 6:55 PM, Argiris Kirtzidis wrote:
>>
>> + // C++ 5.2.3p1:
>> + // If the expression list is a single expression, the type
>> conversion
>> + // expression is equivalent (in definedness, and if defined in
>> meaning) to the
>> + // corresponding cast expression.
>>
>> It seems that this check should happen before the check for
>> recorddecl?
>>
>
> My intention was to do something like this:
> if class type
> -> do semantic checks, resolve constructors etc.
> -> if single expr
> -> create some class-specialized expr
> else if multi expr
> -> create some other class-specialized expr
> ......
>
>
> Instead of:
> if single expr
> -> if non-class type
> -> create CXXFunctionalCastExpr
> -> else if class type
> -> semantic checks, resolve constructor
> -> create some class-specialized expr
>
> Not a big difference though. Will probably be more clear what is
> better when constructors are in place and it's determined what kind
> of Exprs are needed to represent them.
Ok!
This patch looks great to me, plz commit!
-Chris
More information about the cfe-dev
mailing list