This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Guard a call to TYPE_TARGET_TYPE in gnuv3_pass_by_reference
- From: Siva Chandra <sivachandra at google dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 24 Oct 2014 05:56:08 -0700
- Subject: Re: [PATCH] Guard a call to TYPE_TARGET_TYPE in gnuv3_pass_by_reference
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gzAMpiA8Hwt1=DqmFxXjfe44nqGsCqsj-fx=ObJbgPAsA at mail dot gmail dot com> <CAGyQ6gy9eObF+29DSibKj4xxiw9NpoWtarVJTtd-j_A7LBnktA at mail dot gmail dot com> <CAGyQ6gzXKBQ4JVOZeEUAc3fvDtXJ+yACsU74rL2Q4cnO4JTh+g at mail dot gmail dot com> <CADPb22SL8CCmRn22qfGOsSkqtyC86udXTQAf-BK2AcsPUdn7cw at mail dot gmail dot com>
On Thu, Oct 23, 2014 at 10:31 PM, Doug Evans <dje@google.com> wrote:
>>> gdb/ChangeLog:
>>>
>>> * gnu-v3-abi.c (gnuv3_pass_by_reference): Call TYPE_TARGET_TYPE
>>> on the arg type of a constructor only if it is of reference type.
>>>
>>> gdb/testsuite/ChangeLog:
>>>
>>> * gdb.cp/non-trivial-retval.cc: Add a test case.
>>> * gdb.cp/non-trivial-retval.exp: Add a test.
>
> LGTM with one nit.
>
> +class B1
> +{
> +public:
> + B1 () {}
> + B1 (int i); /* Put this decl before the copy-ctor decl. */
> + B1 (const B1 &obj);
> +
> + int b1;
> +};
>
> Can you elaborate on why "Put this decl before ..."?
Thank you. Pushed after adding a detailed comment:
3433cfa51f6397231ffe2b2c69298eff89179769