diff options
author | Bruno Ricci <riccibrun@gmail.com> | 2018-12-22 14:39:30 +0000 |
---|---|---|
committer | Bruno Ricci <riccibrun@gmail.com> | 2018-12-22 14:39:30 +0000 |
commit | ddb8f6b83a3fa46c69b9044ad56849b180647e0d (patch) | |
tree | 46d93792ec03efa2578371efa3e3b13e4f1bdd24 /clang/lib/Sema/SemaInit.cpp | |
parent | 58d38230867528b2cc376a99c2147c89c7af6fcb (diff) | |
download | llvm-ddb8f6b83a3fa46c69b9044ad56849b180647e0d.zip llvm-ddb8f6b83a3fa46c69b9044ad56849b180647e0d.tar.gz llvm-ddb8f6b83a3fa46c69b9044ad56849b180647e0d.tar.bz2 |
[AST] Store the arguments of CXXConstructExpr in a trailing array
Store the arguments of CXXConstructExpr in a trailing array. This is very
similar to the CallExpr case in D55771, with the exception that there is
only one derived class (CXXTemporaryObjectExpr) and that we compute the
offset to the trailing array instead of storing it.
This saves one pointer per CXXConstructExpr and CXXTemporaryObjectExpr.
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D56022
llvm-svn: 350003
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index c2f1422..80cc461 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -6199,7 +6199,7 @@ PerformConstructorInitialization(Sema &S, } S.MarkFunctionReferenced(Loc, Constructor); - CurInit = new (S.Context) CXXTemporaryObjectExpr( + CurInit = CXXTemporaryObjectExpr::Create( S.Context, Constructor, Entity.getType().getNonLValueExprType(S.Context), TSInfo, ConstructorArgs, ParenOrBraceRange, HadMultipleCandidates, |