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?
+ /* We should only see these for location wrapper nodes, or for
+ VIEW_CONVERT_EXPRs within instantiate_non_dependent_expr (when
+ args is NULL_TREE). */
+ gcc_assert (location_wrapper_p (t)
+ || (TREE_CODE (t) == VIEW_CONVERT_EXPR
+ && args == NULL_TREE));
Let's just say "|| args == NULL_TREE", it might be possible to see a
NON_LVALUE_EXPR in that context as well.
Jason