diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-05-13 16:40:10 -0400 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:03:17 -0300 |
commit | f7ddd68ce057008b9ddbf973d1b51c94c74110b3 (patch) | |
tree | 5d9fe12d862c1956d3a37c670c4a4bc0d1b68641 /gcc/tree-inline.c | |
parent | 996dc0ea9b70b2b5803c5b35caeb975888e51e76 (diff) | |
download | gcc-f7ddd68ce057008b9ddbf973d1b51c94c74110b3.zip gcc-f7ddd68ce057008b9ddbf973d1b51c94c74110b3.tar.gz gcc-f7ddd68ce057008b9ddbf973d1b51c94c74110b3.tar.bz2 |
c++: premature requires-expression folding [PR95020]
In the testcase below we're prematurely folding away the
requires-expression to 'true' after substituting in the function's
template arguments, but before substituting in the lambda's deduced
template arguments.
This patch removes the uses_template_parms check when deciding in
tsubst_requires_expr whether to keep around a new requires-expression.
Regardless of whether the template arguments are dependent, there still
might be more template parameters to later substitute in (as in the
below testcase) and even if not, tsubst_expr doesn't perform full
semantic processing unless !processing_template_decl, so we should still
wait until then to fold away the requires-expression.
gcc/cp/ChangeLog:
PR c++/95020
* constraint.c (tsubst_requires_expr): Produce a new
requires-expression when processing_template_decl, even if
template arguments are not dependent.
gcc/testsuite/ChangeLog:
PR c++/95020
* g++/cpp2a/concepts-lambda7.C: New test.
Diffstat (limited to 'gcc/tree-inline.c')
0 files changed, 0 insertions, 0 deletions