]> granicus.if.org Git - clang/commit
Make CXXNewExpr contain only a single initialier, and not hold the used constructor...
authorSebastian Redl <sebastian.redl@getdesigned.at>
Thu, 16 Feb 2012 10:58:10 +0000 (10:58 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Thu, 16 Feb 2012 10:58:10 +0000 (10:58 +0000)
commit5f688f4b15d02aa7ad159c46b1f78fe59d412f12
tree8b67f7660948832957b76569958a3bda8d15fe75
parent13ca53473fd98520b236fb2dbfce228007ac4bed
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.

This breaks the static analysis of new expressions. I've filed PR12014 to track this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150682 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
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/ParseExprCXX.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/TreeTransform.h
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp
lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
test/Analysis/new.cpp
tools/libclang/CIndex.cpp