On Mon, Jan 08, 2018 at 12:10:50PM -0500, Nathan Sidwell wrote:
> > Both "_S_terminal" VAR_DECLs have a "_CharT" TEMPLATE_TYPE_PARM, but
> > these types are different tree nodes.
> 
> correct. they are not EQ but are EQUAL (same_type_p will be true).

So perhaps location_wrapper_p could use that instead of pointer comparison.
Though it would be expensive.

> > Some ideas:
> 
> > * don't add location wrappers if processing a template
> > 
> > * introduce a new tree node for location wrappers (gah)
> > 
> > * something I haven't thought of
> 
> Add a flag on the VIEW_CONVERT/NON_LVALUE expr explicitly noting its
> wrapperness (rather than infer it from TREE_TYPE == TREE_TYPE
> (TREE_OPERAND)).  TREE_LANG_FLAG_0 looks available?

Yeah, I think most if not all lang flags are still available for those two
tree codes and checking that should be quite cheap.

        Jakub

Reply via email to