diff options
author | Bruno Ricci <riccibrun@gmail.com> | 2019-02-14 15:43:17 +0000 |
---|---|---|
committer | Bruno Ricci <riccibrun@gmail.com> | 2019-02-14 15:43:17 +0000 |
commit | c39f8dfa7317f10923cf5ab2d650adde1abaa612 (patch) | |
tree | 8c2e2644672f409dfad1129e7dc2feca2ee0eeba /lldb/packages/Python/lldbsuite/test/python_api/thread/main2.cpp | |
parent | 362fe560345321a0987d8c296f4fd83d1922763f (diff) | |
download | bcm5719-llvm-c39f8dfa7317f10923cf5ab2d650adde1abaa612.tar.gz bcm5719-llvm-c39f8dfa7317f10923cf5ab2d650adde1abaa612.zip |
[Sema] Fix a regression introduced in "[AST][Sema] Remove CallExpr::setNumArgs"
D54902 removed CallExpr::setNumArgs in preparation of tail-allocating the
arguments of CallExpr. It did this by allocating storage for
max(number of arguments, number of parameters in the prototype). The
temporarily nulled arguments however causes issues in BuildResolvedCallExpr
when typo correction is done just after the creation of the call expression.
This was unfortunately missed by the tests /:
To fix this, delay setting the number of arguments to
max(number of arguments, number of parameters in the prototype) until we are
ready for it. It would be nice to have this encapsulated in CallExpr but this
is the best I can come up with under the constraint that we cannot add
anything the CallExpr.
Fixes PR40286.
Differential Revision: https://reviews.llvm.org/D57948
Reviewed By: aaron.ballman
llvm-svn: 354035
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/thread/main2.cpp')
0 files changed, 0 insertions, 0 deletions