diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-02-18 09:31:05 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-02-18 09:31:05 +0000 |
commit | c484df6c4d82f395d38f814ada9f7b7447727a51 (patch) | |
tree | f1d98a3d8dbbdcf167e7eaab89fa07346b0ca5f0 /lib/CodeGen/CGDecl.cpp | |
parent | 8f39121d6c4bfe80f757a3032e895359da3536ae (diff) |
Merging r354035:
------------------------------------------------------------------------
r354035 | brunoricci | 2019-02-14 16:43:17 +0100 (Thu, 14 Feb 2019) | 23 lines
[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
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@354247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
0 files changed, 0 insertions, 0 deletions