===================================================================
@@ -2696,9 +2696,8 @@ finish_class_member_access_expr (tree object, tree
BASELINK_QUALIFIED_P (member) = 1;
orig_name = member;
}
- return build_min_non_dep (COMPONENT_REF, expr,
- orig_object, orig_name,
- NULL_TREE);
+ return build_min_non_dep_loc (UNKNOWN_LOCATION, COMPONENT_REF, expr,
+ orig_object, orig_name, NULL_TREE);
}
return expr;
@@ -2763,7 +2762,7 @@ 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 (loc, INDIRECT_REF, rval, orig_expr);
else
return rval;
}
@@ -3631,7 +3630,7 @@ 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 (loc, code, expr, orig_arg1, orig_arg2);
return expr;
}
@@ -3660,8 +3659,8 @@ build_x_array_ref (location_t loc, tree arg1, tree
NULL_TREE, /*overload=*/NULL, complain);
if (processing_template_decl && expr != error_mark_node)
- return build_min_non_dep (ARRAY_REF, expr, orig_arg1, orig_arg2,
- NULL_TREE, NULL_TREE);
+ return build_min_non_dep_loc (loc, ARRAY_REF, expr, orig_arg1, orig_arg2,
+ NULL_TREE, NULL_TREE);
return expr;
}
@@ -4764,7 +4763,7 @@ build_x_unary_op (location_t loc, enum tree_code c
}
if (processing_template_decl && exp != error_mark_node)
- exp = build_min_non_dep (code, exp, orig_expr,
+ exp = build_min_non_dep_loc (loc, code, exp, orig_expr,
/*For {PRE,POST}{INC,DEC}REMENT_EXPR*/NULL_TREE);
if (TREE_CODE (exp) == ADDR_EXPR)
PTRMEM_OK_P (exp) = ptrmem;
@@ -5624,8 +5623,8 @@ build_x_conditional_expr (location_t loc, tree ife
expr = build_conditional_expr (ifexp, op1, op2, complain);
if (processing_template_decl && expr != error_mark_node)
{
- tree min = build_min_non_dep (COND_EXPR, expr,
- orig_ifexp, orig_op1, orig_op2);
+ tree min = build_min_non_dep_loc (loc, COND_EXPR, expr,
+ orig_ifexp, orig_op1, orig_op2);
/* In C++11, remember that the result is an lvalue or xvalue.
In C++98, lvalue_kind can just assume lvalue in a template. */
if (cxx_dialect >= cxx0x
@@ -5742,7 +5741,8 @@ build_x_compound_expr (location_t loc, tree op1, t
result = cp_build_compound_expr (op1, op2, complain);
if (processing_template_decl && result != error_mark_node)
- return build_min_non_dep (COMPOUND_EXPR, result, orig_op1, orig_op2);
+ return build_min_non_dep_loc (loc, COMPOUND_EXPR, result,
+ orig_op1, orig_op2);
return result;
}
===================================================================
@@ -2086,7 +2086,7 @@ build_min (enum tree_code code, tree tt, ...)
built. */
tree
-build_min_non_dep (enum tree_code code, tree non_dep, ...)
+build_min_non_dep_loc (location_t loc, enum tree_code code, tree non_dep, ...)
{
tree t;
int length;
@@ -2101,6 +2101,7 @@ tree
non_dep = TREE_OPERAND (non_dep, 0);
t = make_node (code);
+ SET_EXPR_LOCATION (t, loc);
length = TREE_CODE_LENGTH (code);
TREE_TYPE (t) = TREE_TYPE (non_dep);
TREE_SIDE_EFFECTS (t) = TREE_SIDE_EFFECTS (non_dep);
===================================================================
@@ -407,8 +407,8 @@ grok_array_decl (location_t loc, tree array_expr,
expr = build_array_ref (input_location, array_expr, index_exp);
}
if (processing_template_decl && expr != error_mark_node)
- return build_min_non_dep (ARRAY_REF, expr, orig_array_expr, orig_index_exp,
- NULL_TREE, NULL_TREE);
+ return build_min_non_dep_loc (loc, ARRAY_REF, expr, orig_array_expr,
+ orig_index_exp, NULL_TREE, NULL_TREE);
return expr;
}
===================================================================
@@ -5697,7 +5697,8 @@ extern bool builtin_valid_in_constant_expr_p (c
extern tree build_min (enum tree_code, tree, ...);
extern tree build_min_nt_loc (location_t, enum tree_code,
...);
-extern tree build_min_non_dep (enum tree_code, tree, ...);
+extern tree build_min_non_dep_loc (location_t, enum tree_code,
+ tree, ...);
extern tree build_min_non_dep_call_vec (tree, tree, VEC(tree,gc) *);
extern tree build_cplus_new (tree, tree, tsubst_flags_t);
extern tree build_aggr_init_expr (tree, tree, tsubst_flags_t);