[cfe-dev] [PATCH] Function-style casting

Argiris Kirtzidis akyrtzi at gmail.com
Sat Aug 16 14:45:08 PDT 2008


The attached patch adds support for C++'s "Type-Spec( expression-list )" 

-The Parser calls a new "ActOnCXXTypeConstructExpr" action.
-Sema, depending on the type and expressions number:
     -If the type is a class, treats it as a class constructor [TODO]
     -If there's only one expression (i.e. "int(0.5)" ), creates a 
"CXXFunctionalCastExpr" Expr node
     -If there are no expressions (i.e "int()" ), creates a 
"CXXZeroInitValueExpr" Expr node.

Ambiguity introduced by function-style casting, will be resolved in 
another patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: func-style-cast.patch
Type: text/x-diff
Size: 21332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080816/b4479509/attachment.patch>

More information about the cfe-dev mailing list