diff options
author | Jason Merrill <jason@redhat.com> | 2020-03-31 17:34:47 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-04-01 01:17:23 -0400 |
commit | 76f09260b7eccd6c3cfa3dcf3c22897fe12a8065 (patch) | |
tree | d51c2df1204ac7e061b58945552282bbcb104167 /gcc/tree-object-size.c | |
parent | 595f1b1274b1cb86c74c72b9cc297e6981fe4549 (diff) | |
download | gcc-76f09260b7eccd6c3cfa3dcf3c22897fe12a8065.zip gcc-76f09260b7eccd6c3cfa3dcf3c22897fe12a8065.tar.gz gcc-76f09260b7eccd6c3cfa3dcf3c22897fe12a8065.tar.bz2 |
c++: Fix DMI with lambda 'this' capture [PR94205]
We represent 'this' in a default member initializer with a PLACEHOLDER_EXPR.
Normally in constexpr evaluation when we encounter one it refers to
ctx->ctor, but when we're creating a temporary of class type, that replaces
ctx->ctor, so a PLACEHOLDER_EXPR that refers to the type of the member being
initialized needs to be replaced before that happens.
gcc/cp/ChangeLog
2020-03-31 Jason Merrill <jason@redhat.com>
PR c++/94205
* constexpr.c (cxx_eval_constant_expression) [TARGET_EXPR]: Call
replace_placeholders.
* typeck2.c (store_init_value): Fix arguments to
fold_non_dependent_expr.
Diffstat (limited to 'gcc/tree-object-size.c')
0 files changed, 0 insertions, 0 deletions