[PATCH v3 of 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)

Jakub Jelinek jakub@redhat.com
Tue Jan 9 14:39:00 GMT 2018


On Tue, Jan 09, 2018 at 09:36:58AM -0500, Jason Merrill wrote:
> On 01/09/2018 06:53 AM, David Malcolm wrote:
> > +    case NON_LVALUE_EXPR:
> > +    case VIEW_CONVERT_EXPR:
> > +	{
> > +	  /* Handle location wrappers by substituting the wrapped node
> > +	     first,*then*  reusing the resulting type.  Doing the type
> > +	     first ensures that we handle template parameters and
> > +	     parameter pack expansions.  */
> > +	  gcc_assert (location_wrapper_p (t));
> > +	  tree op0 = tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl);
> > +	  return build1 (code, TREE_TYPE (op0), op0);
> > +	}
> 
> Doesn't this lose the location information?

And the public_flag...

	Jakub



More information about the Gcc-patches mailing list