c++: Avoid building garbage trees from tsubst_requires_expr
authorPatrick Palka <ppalka@redhat.com>
Tue, 2 Mar 2021 12:38:13 +0000 (07:38 -0500)
committerPatrick Palka <ppalka@redhat.com>
Tue, 2 Mar 2021 12:38:13 +0000 (07:38 -0500)
commitd6378b9785b856785d6649d0f769a25b8bb47c9b
treeea7753650e50263a8cae4437f6899da144f5c240
parent2bd58910b04ea785adda683cf0d494ebe11be477
c++: Avoid building garbage trees from tsubst_requires_expr

Since we no longer partially instantiate REQUIRES_EXPRs, we don't need
to rebuild its requirements during tsubst_requires_expr.

gcc/cp/ChangeLog:

* constraint.cc (tsubst_simple_requirement): Just return
boolean_true_node on success.
(tsubst_type_requirement): Likewise.
(tsubst_compound_requirement): Likewise.
(tsubst_nested_requirement): Likewise.
(tsubst_requirement_body): Remove.
(check_constaint_variables): Rename to ...
(check_constraint_variables): ... this.
(tsubst_constraint_variables): Adjust.
(tsubst_requires_expr): Fold tsubst_requirement_body into here.
gcc/cp/constraint.cc