Re: [PATCH] c++: Include the constraint parameter mapping in diagnostic constraint contexts

2020-03-20 Thread Patrick Palka via Gcc-patches
On Thu, 19 Mar 2020, Jason Merrill wrote: > On 3/19/20 12:50 PM, Patrick Palka wrote: > > On Thu, 19 Mar 2020, Jason Merrill wrote: > > > > > On 3/18/20 3:26 PM, Patrick Palka wrote: > > > > + if (map) > > > > +{ > > > > + pp_cxx_whitespace (pp); > > > > + pp_cxx_left_bracket

Re: [PATCH] c++: Include the constraint parameter mapping in diagnostic constraint contexts

2020-03-19 Thread Jason Merrill via Gcc-patches
On 3/19/20 12:50 PM, Patrick Palka wrote: On Thu, 19 Mar 2020, Jason Merrill wrote: On 3/18/20 3:26 PM, Patrick Palka wrote: + if (map) +{ + pp_cxx_whitespace (pp); + pp_cxx_left_bracket (pp); + pp->translate_string ("with"); + pp_cxx_whitespace (pp); +

Re: [PATCH] c++: Include the constraint parameter mapping in diagnostic constraint contexts

2020-03-19 Thread Patrick Palka via Gcc-patches
On Thu, 19 Mar 2020, Jason Merrill wrote: > On 3/18/20 3:26 PM, Patrick Palka wrote: > > + if (map) > > +{ > > + pp_cxx_whitespace (pp); > > + pp_cxx_left_bracket (pp); > > + pp->translate_string ("with"); > > + pp_cxx_whitespace (pp); > > + pp_cxx_parameter_mapping

Re: [PATCH] c++: Include the constraint parameter mapping in diagnostic constraint contexts

2020-03-19 Thread Jason Merrill via Gcc-patches
On 3/18/20 3:26 PM, Patrick Palka wrote: + if (map) +{ + pp_cxx_whitespace (pp); + pp_cxx_left_bracket (pp); + pp->translate_string ("with"); + pp_cxx_whitespace (pp); + pp_cxx_parameter_mapping (pp, map); + pp_cxx_right_bracket (pp); +} Perhaps we should

Re: [PATCH] c++: Include the constraint parameter mapping in diagnostic constraint contexts

2020-03-18 Thread Patrick Palka via Gcc-patches
On Wed, 18 Mar 2020, Patrick Palka wrote: > When diagnosing a constraint error, we currently try to print the constraint > inside a diagnostic constraint context with its template arguments substituted > in. If substitution fails, then we instead just print the dependent > form, as in the the

[PATCH] c++: Include the constraint parameter mapping in diagnostic constraint contexts

2020-03-18 Thread Patrick Palka via Gcc-patches
When diagnosing a constraint error, we currently try to print the constraint inside a diagnostic constraint context with its template arguments substituted in. If substitution fails, then we instead just print the dependent form, as in the the test case below: