Re: [C++ Patch] Improve build_new locations

2020-01-07 Thread Jason Merrill
On 1/7/20 5:46 AM, Paolo Carlini wrote: Hi, On 06/01/20 21:47, Jason Merrill wrote: On 1/2/20 4:23 AM, Paolo Carlini wrote: @@ -19320,8 +19320,8 @@ tsubst_copy_and_build (tree t,     tree op1 = tsubst (TREE_OPERAND (t, 1), args, complain, in_decl);   tree op2 = RECUR (TREE_OPERAND (t

Re: [C++ Patch] Improve build_new locations

2020-01-07 Thread Paolo Carlini
Hi, On 06/01/20 21:47, Jason Merrill wrote: On 1/2/20 4:23 AM, Paolo Carlini wrote: @@ -19320,8 +19320,8 @@ tsubst_copy_and_build (tree t,     tree op1 = tsubst (TREE_OPERAND (t, 1), args, complain, in_decl);   tree op2 = RECUR (TREE_OPERAND (t, 2)); -    ret = build_new (&placement_v

Re: [C++ Patch] Improve build_new locations

2020-01-06 Thread Jason Merrill
On 1/2/20 4:23 AM, Paolo Carlini wrote: @@ -19320,8 +19320,8 @@ tsubst_copy_and_build (tree t, tree op1 = tsubst (TREE_OPERAND (t, 1), args, complain, in_decl); tree op2 = RECUR (TREE_OPERAND (t, 2)); - ret = build_new (&placement_vec, op1, op2, &init_vec, -

[C++ Patch] Improve build_new locations

2020-01-02 Thread Paolo Carlini
Hi, some rather straightforward bits for build_new / cp_parser_new_expression, almost a clean-up. It would be nice to do better for the diagnostic issued from build_new_1 too but having consistent locations for all the valid_array_size_p and invalid_array_size_error calls isn't trivial, I'd r