Re: [PATCH v4] c++: Implement -Wself-move warning [PR81159]

2022-08-25 Thread Jason Merrill via Gcc-patches
On 8/25/22 17:49, Marek Polacek wrote: On Thu, Aug 25, 2022 at 09:25:43AM -0400, Jason Merrill wrote: On 8/24/22 17:30, Marek Polacek wrote: On Tue, Aug 23, 2022 at 05:27:00PM -0400, Jason Merrill wrote: On 8/23/22 09:39, Marek Polacek wrote: + tree arg = CALL_EXPR_ARG (fn, 0); + extract_op

Re: [PATCH v4] c++: Implement -Wself-move warning [PR81159]

2022-08-25 Thread Marek Polacek via Gcc-patches
On Thu, Aug 25, 2022 at 09:25:43AM -0400, Jason Merrill wrote: > On 8/24/22 17:30, Marek Polacek wrote: > > On Tue, Aug 23, 2022 at 05:27:00PM -0400, Jason Merrill wrote: > > > On 8/23/22 09:39, Marek Polacek wrote: > > > > + tree arg = CALL_EXPR_ARG (fn, 0); > > > > + extract_op (arg); > > > > +

Re: [PATCH v4] c++: Implement -Wself-move warning [PR81159]

2022-08-25 Thread Jason Merrill via Gcc-patches
On 8/24/22 17:30, Marek Polacek wrote: On Tue, Aug 23, 2022 at 05:27:00PM -0400, Jason Merrill wrote: On 8/23/22 09:39, Marek Polacek wrote: + tree arg = CALL_EXPR_ARG (fn, 0); + extract_op (arg); + if (TREE_CODE (arg) == ADDR_EXPR) +arg = TREE_OPERAND (arg, 0); + tree type = TREE_TYPE

Re: [PATCH v4] c++: Implement -Wself-move warning [PR81159]

2022-08-24 Thread Marek Polacek via Gcc-patches
On Tue, Aug 23, 2022 at 05:27:00PM -0400, Jason Merrill wrote: > On 8/23/22 09:39, Marek Polacek wrote: > > + tree arg = CALL_EXPR_ARG (fn, 0); > > + extract_op (arg); > > + if (TREE_CODE (arg) == ADDR_EXPR) > > +arg = TREE_OPERAND (arg, 0); > > + tree type = TREE_TYPE (lhs); > > + lhs = m

Re: [PATCH v4] c++: Implement -Wself-move warning [PR81159]

2022-08-23 Thread Jason Merrill via Gcc-patches
On 8/23/22 09:39, Marek Polacek wrote: On Sat, Aug 20, 2022 at 05:31:52PM -0400, Jason Merrill wrote: On 8/19/22 15:34, Marek Polacek wrote: On Thu, Aug 18, 2022 at 08:33:47PM -0400, Jason Merrill wrote: On 8/18/22 13:19, Marek Polacek wrote: On Mon, Aug 15, 2022 at 03:54:05PM -0400, Jason Me

[PATCH v4] c++: Implement -Wself-move warning [PR81159]

2022-08-23 Thread Marek Polacek via Gcc-patches
On Sat, Aug 20, 2022 at 05:31:52PM -0400, Jason Merrill wrote: > On 8/19/22 15:34, Marek Polacek wrote: > > On Thu, Aug 18, 2022 at 08:33:47PM -0400, Jason Merrill wrote: > > > On 8/18/22 13:19, Marek Polacek wrote: > > > > On Mon, Aug 15, 2022 at 03:54:05PM -0400, Jason Merrill wrote: > > > > > On