[cfe-commits] r150685 - in /cfe/trunk: include/clang/AST/ExprCXX.h include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/AST/ExprCXX.cpp lib/AST/ItaniumMangle.cpp lib/AST/StmtPrinter.cpp lib/AST/StmtProfile.cpp lib/CodeGen/CGExprCXX.cpp lib/Parse/ParseE

Sebastian Redl sebastian.redl at getdesigned.at
Sat Feb 18 02:26:51 PST 2012


On 18.02.2012, at 02:10, Matt Beaumont-Gay wrote:

> I'm updating some code to for these API changes, and I'm starting to
> think it might be nice to add a little method like this to CXXNewExpr:
> 
> const CXXConstructExpr* getConstructExpr() {
>  return dyn_cast_or_null<CXXConstructExpr>(getInitializer());
> }
> 
> It seems to be pretty common that code that was looking into 'new'
> exprs mostly wanted to dig out information about the constructor (if
> any). What do you think?

Sure, why not?

Sebastian



More information about the cfe-commits mailing list