This is an archive of the discontinued LLVM Phabricator instance.

[AST] Store the arguments of CXXConstructExpr in a trailing array
ClosedPublic

Authored by riccibruno on Dec 21 2018, 1:15 PM.

Details

Summary

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.

(with some comments inline)

Diff Detail

Repository
rC Clang

Event Timeline

riccibruno created this revision.Dec 21 2018, 1:15 PM
riccibruno marked 2 inline comments as done.Dec 21 2018, 1:19 PM
riccibruno added inline comments.
include/clang/AST/ExprCXX.h
1295

Removed the default member initializer as it is initialized unconditionally
in the constructor.

1613

Changed the name from Type since Type was imho an unfortunate choice.

rjmccall accepted this revision.Dec 21 2018, 1:41 PM

LGTM.

include/clang/AST/ExprCXX.h
1613

Agreed.

This revision is now accepted and ready to land.Dec 21 2018, 1:41 PM
This revision was automatically updated to reflect the committed changes.