summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects/refwrap/unwrap_reference.pass.cpp
diff options
context:
space:
mode:
authorBruno Ricci <riccibrun@gmail.com>2018-12-03 13:23:56 +0000
committerBruno Ricci <riccibrun@gmail.com>2018-12-03 13:23:56 +0000
commit6ef089d21c8853d4623980617f18490ab64c8548 (patch)
tree099ec18533bdf179e1c8b02994b843b9cbd05ba8 /libcxx/test/std/utilities/function.objects/refwrap/unwrap_reference.pass.cpp
parent7800dbe157eae0b5380afff848e5a930b30ab6ac (diff)
downloadbcm5719-llvm-6ef089d21c8853d4623980617f18490ab64c8548.tar.gz
bcm5719-llvm-6ef089d21c8853d4623980617f18490ab64c8548.zip
[Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType
CallExpr::setNumArgs is the only thing that prevents storing the arguments of a call expression in a trailing array since it might resize the argument array. setNumArgs is only called in 3 places in Sema, and for all of them it is possible to avoid it. This deals with the call to setNumArgs in BuildCallToObjectOfClassType. Instead of constructing the CXXOperatorCallExpr first and later calling setNumArgs if we have default arguments, we first construct a large enough SmallVector, do the promotion/check of the arguments, and then construct the CXXOperatorCallExpr. Incidentally this also avoid reallocating the arguments when the call operator has default arguments but this is not the primary goal. Differential Revision: https://reviews.llvm.org/D54900 Reviewed By: aaron.ballman llvm-svn: 348134
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/refwrap/unwrap_reference.pass.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud