c++: Don't save parms in nested requirement [pr 94827]
This followup patch just removes some stashing that we never made use of. * constraint.cc (tsubst_nested_requirement): TYPE directly holds notmalized requirement. (finish_nested_requirement): Don't stash current tpl parms into the requirement. (diagnose_nested_requirement): TYPE directly holds notmalized requirement.
This commit is contained in:
parent
05be85b649
commit
f1621d18f5
@ -1,3 +1,13 @@
|
||||
2020-05-04 Nathan Sidwell <nathan@acm.org>
|
||||
|
||||
PR c++/94827 -- don't save parms in nested requirement
|
||||
* constraint.cc (tsubst_nested_requirement): TYPE directly holds
|
||||
notmalized requirement.
|
||||
(finish_nested_requirement): Don't stash current tpl parms into
|
||||
the requirement.
|
||||
(diagnose_nested_requirement): TYPE directly holds notmalized
|
||||
requirement.
|
||||
|
||||
2020-05-01 Patrick Palka <ppalka@redhat.com>
|
||||
|
||||
PR c++/90880
|
||||
|
@ -2010,7 +2010,7 @@ static tree
|
||||
tsubst_nested_requirement (tree t, tree args, subst_info info)
|
||||
{
|
||||
/* Ensure that we're in an evaluation context prior to satisfaction. */
|
||||
tree norm = TREE_VALUE (TREE_TYPE (t));
|
||||
tree norm = TREE_TYPE (t);
|
||||
tree result = satisfy_constraint (norm, args, info);
|
||||
if (result == error_mark_node && info.quiet ())
|
||||
{
|
||||
@ -2958,16 +2958,9 @@ finish_nested_requirement (location_t loc, tree expr)
|
||||
/* Currently open template headers have dummy arg vectors, so don't
|
||||
pass into normalization. */
|
||||
tree norm = normalize_constraint_expression (expr, NULL_TREE, false);
|
||||
tree args = current_template_parms
|
||||
? template_parms_to_args (current_template_parms) : NULL_TREE;
|
||||
|
||||
/* Save the normalized constraint and complete set of normalization
|
||||
arguments with the requirement. We keep the complete set of arguments
|
||||
around for re-normalization during diagnostics. */
|
||||
tree info = build_tree_list (args, norm);
|
||||
|
||||
/* Build the constraint, saving its normalization as its type. */
|
||||
tree r = build1 (NESTED_REQ, info, expr);
|
||||
tree r = build1 (NESTED_REQ, norm, expr);
|
||||
SET_EXPR_LOCATION (r, loc);
|
||||
return r;
|
||||
}
|
||||
@ -3370,7 +3363,7 @@ diagnose_nested_requirement (tree req, tree args)
|
||||
{
|
||||
/* Quietly check for satisfaction first. We can elaborate details
|
||||
later if needed. */
|
||||
tree norm = TREE_VALUE (TREE_TYPE (req));
|
||||
tree norm = TREE_TYPE (req);
|
||||
subst_info info (tf_none, NULL_TREE);
|
||||
tree result = satisfy_constraint (norm, args, info);
|
||||
if (result == boolean_true_node)
|
||||
|
Loading…
Reference in New Issue
Block a user