diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-22 17:20:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-22 17:20:18 +0000 |
commit | 8c3e554d00d456d5093c21ce8a0c205461279aab (patch) | |
tree | 66f1333480789c8fb62e06dd67cf0ddc21764bac /lib/Sema | |
parent | 759e41baf6a95c3a265970b6bf1c97c233fd28b0 (diff) |
Preserve the zero-initialization and construction-kind settings when
instantiating CXXConstructExpr expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111780 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/TreeTransform.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index 90ec1bd96a..656c03d890 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -1684,14 +1684,17 @@ public: SourceLocation Loc, CXXConstructorDecl *Constructor, bool IsElidable, - MultiExprArg Args) { + MultiExprArg Args, + bool RequiresZeroInit, + CXXConstructExpr::ConstructionKind ConstructKind) { ASTOwningVector<&ActionBase::DeleteExpr> ConvertedArgs(SemaRef); if (getSema().CompleteConstructorCall(Constructor, move(Args), Loc, ConvertedArgs)) return getSema().ExprError(); return getSema().BuildCXXConstructExpr(Loc, T, Constructor, IsElidable, - move_arg(ConvertedArgs)); + move_arg(ConvertedArgs), + RequiresZeroInit, ConstructKind); } /// \brief Build a new object-construction expression. @@ -5686,7 +5689,9 @@ TreeTransform<Derived>::TransformCXXConstructExpr(CXXConstructExpr *E) { return getDerived().RebuildCXXConstructExpr(T, /*FIXME:*/E->getLocStart(), Constructor, E->isElidable(), - move_arg(Args)); + move_arg(Args), + E->requiresZeroInitialization(), + E->getConstructionKind()); } /// \brief Transform a C++ temporary-binding expression. |