summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorBruno Ricci <riccibrun@gmail.com>2018-11-20 16:20:40 +0000
committerBruno Ricci <riccibrun@gmail.com>2018-11-20 16:20:40 +0000
commitf49e1ca04d3fc2bdd7b4eaa55e70609c6172ca09 (patch)
tree84f6999b22751929ae8539b521c7f181422ffb4a /clang/lib/Sema/SemaDeclCXX.cpp
parent855dfee2c2b4a591826d0a596425addfc9e70a93 (diff)
downloadbcm5719-llvm-f49e1ca04d3fc2bdd7b4eaa55e70609c6172ca09.tar.gz
bcm5719-llvm-f49e1ca04d3fc2bdd7b4eaa55e70609c6172ca09.zip
[AST] Store the expressions in ParenListExpr in a trailing array
Use the newly available space in the bit-fields of Stmt and store the expressions in a trailing array. This saves 2 pointer per ParenListExpr. Differential Revision: https://reviews.llvm.org/D54675 Reviewed By: rjmccall llvm-svn: 347320
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 6f173b165f5..61ef7cb9373 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -3731,8 +3731,7 @@ Sema::ActOnMemInitializer(Decl *ConstructorD,
ArrayRef<Expr *> Args,
SourceLocation RParenLoc,
SourceLocation EllipsisLoc) {
- Expr *List = new (Context) ParenListExpr(Context, LParenLoc,
- Args, RParenLoc);
+ Expr *List = ParenListExpr::Create(Context, LParenLoc, Args, RParenLoc);
return BuildMemInitializer(ConstructorD, S, SS, MemberOrBase, TemplateTypeTy,
DS, IdLoc, List, EllipsisLoc);
}
OpenPOWER on IntegriCloud