[cfe-commits] r150682 - 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
Thu Feb 16 06:59:23 PST 2012

On 16.02.2012, at 14:51, Eli Friedman wrote:

> On Thu, Feb 16, 2012 at 2:58 AM, Sebastian Redl
> <sebastian.redl at getdesigned.at> wrote:
>> Author: cornedbee
>> Date: Thu Feb 16 04:58:10 2012
>> New Revision: 150682
>> URL: http://llvm.org/viewvc/llvm-project?rev=150682&view=rev
>> Log:
>> Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.
>> Holding the constructor directly makes no sense when list-initialized arrays come into play. The constructor is now held in a CXXConstructExpr, if construction is what is done. The new design can also distinguish properly between list-initialization and direct-initialization, as well as implicit default-initialization constructors and explicit value-initialization constructors. Finally, doing it this way removes redundance from the AST because CXXNewExpr doesn't try to handle both the allocation and the initialization responsibilities.
> Does this have any effect on http://llvm.org/bugs/show_bug.cgi?id=11757 ?

No, it still creates the copy. But now it should be possible to the set elidable flag on the copy construction (CXXNewExpr didn't have such a flag) and then get rid of the copy.


More information about the cfe-commits mailing list