This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Guard a call to TYPE_TARGET_TYPE in gnuv3_pass_by_reference


On Thu, Oct 23, 2014 at 12:09 PM, Siva Chandra <sivachandra@google.com> wrote:
> On Thu, Oct 16, 2014 at 12:01 PM, Siva Chandra <sivachandra@google.com> wrote:
>> The patch updated with a test case is attached.
>>
>> 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.
>
> Ping.

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 ..."?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]