On 05/15/2012 04:56 PM, Paolo Carlini wrote:
@@ -2753,7 +2754,8 @@ build_x_indirect_ref (location_t loc, tree expr, r
rval = cp_build_indirect_ref (expr, errorstring, complain);
if (processing_template_decl&& rval != error_mark_node)
- return build_min_non_dep (INDIRECT_REF, rval, orig_expr);
+ return build_min_non_dep_loc (EXPR_LOCATION (rval), INDIRECT_REF,
Shouldn't this use loc? If rval comes from cp_build_indirect_ref, it
might not have the right location.
@@ -3621,15 +3623,16 @@ build_x_binary_op (location_t loc, enum tree_code
warn_about_parentheses (code, arg1_code, orig_arg1, arg2_code, orig_arg2);
if (processing_template_decl && expr != error_mark_node)
- return build_min_non_dep (code, expr, orig_arg1, orig_arg2);
-
+ return build_min_non_dep_loc (EXPR_LOCATION (expr), code, expr,
Likewise. Similarly in build_x_array_ref, build_x_unary_op,
build_x_conditional_expr, build_x_compound_expr.
I still see a lot of EXPR_LOC_OR_HERE in the patch, is that deliberate?
Jason