+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
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 ())
{
/* 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;
}
{
/* 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)