Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Artemiy Volkov <artemiyv@acm.org>, gdb-patches@sourceware.org
Cc: keiths@redhat.com
Subject: Re: [PATCH v5 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests
Date: Mon, 20 Jun 2016 19:04:00 -0000	[thread overview]
Message-ID: <706fb65c-cca9-9da0-8609-4b9748ccda69@redhat.com> (raw)
In-Reply-To: <20160606192225.12384-12-artemiyv@acm.org>

Thanks a lot for doing this.

On 06/06/2016 08:22 PM, Artemiy Volkov wrote:
> --- /dev/null
> +++ b/gdb/testsuite/gdb.cp/rvalue-ref-casts.cc
> @@ -0,0 +1,56 @@
> +#include <utility>

Please add a GPLv3+ header to all new testsuite files.
Some existing files don't have them, but all new files
are required to.  If you based the file on some pre-existing
file, them we should preserve the copyright year range.  If
that is the case, and the file does not currently have
a header, use the date the original file was first committed
to the sources (git blame/log and/or grepping ChangeLog files
should allow finding easily).

> +main (int argc, char **argv)
> +{
> +  A *a = new B(42, 1729);
> +  B *b = (B *) a;
> +  A &ar = *b;
> +  B &br = (B&)ar;
> +  A &&arr = std::move(A(42));
> +  B &&brr = std::move(B(42, 1729));

All new tests should follow GNU coding conventions too, unless
required otherwise for the particular issue being tested
(which doesn't seem to be the case here).

IOW, missing spaces before parentheses, & and casts:

  B &br = (B &) ar;
  A &&arr = std::move (A (42));
  B &&brr = std::move (B (42, 1729));

> +# Copyright 2016 Free Software Foundation, Inc.
> +
...
> +
> +# C++11 rvalue reference type casting tests, based on gdb.cp/casts.exp.
> +#

If there's copyrightable content in the file that came from gdb.cp/casts.exp,
then please preserve the copyright year range.

On 06/06/2016 08:22 PM, Artemiy Volkov wrote:
> +++ b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
...
> +#
> +# This is hairy to begin with.  It is even more hairy because of the
> +# XX_* alternate patterns to catch the KFAIL and XFAIL cases.
> +
> +set re_class	"((struct|class) foo \{${ws}public:|struct foo \{)"
> +set re_fields   ""
> +set re_ctor	"foo\\(void\\);${ws}foo\\(foo_lval_ref\\);${ws}foo\\(foo_rval_ref\\);"
> +set re_dtor	"~foo\\((void|)\\);"
> +set XX_dtor	"~foo\\(int\\);"
> +set re_methods "${ws}int overload1arg\\(foo_lval_ref\\);"
> +append re_methods "${ws}int overload1arg\\(foo_rval_ref\\);"
> +set re_synth	"foo & operator=\\(foo const ?&\\);"
> +
> +gdb_test_multiple "ptype foo_rr_instance1" "ptype foo_rr_instance1" {
> +    -re "type = $re_class${ws}$re_synth${ws}$re_dtor${ws}$re_ctor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
> +	# gcc 2.95.3 -gstabs+, no "const" on "const char *"
> +	# TODO: gdb.base/constvar.exp has XFAILed this kind of problem for a
> +	# long time, but an XFAIL really needs an external bug report.
> +	# -- chastain 2003-12-31
> +	# setup_xfail "*-*-*"
> +	# fail "ptype foo_rr_instance1"
> +	# TODO: this should be a KFAIL.
> +	pass "ptype foo_rr_instance1 (shorter match)"
> +    }
> +    -re "type = $re_class${ws}$re_synth${ws}$re_dtor${ws}$re_ctor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
> +	# gcc 2.95.3 -gstabs+ if "const char *" ever gets fixed
> +	pass "ptype foo_rr_instance1"
> +    }
> +    -re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$XX_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
> +	# gcc 3.3.2 -gdwarf-2, "~foo(int)"
> +	# TODO: kfail this
> +	# kfail "gdb/1113" "ptype foo_rr_instance1"
> +	pass "ptype foo_rr_instance1 (shorter match)"
> +    }
> +    -re "type = $re_class{ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
> +	# gcc 3.3.2 -gdwarf-2, if the dtor bug gets fixed
> +	# gcc HEAD -gdwarf-2 (abi-2)
> +	# TODO: just pass this
> +	pass "ptype foo_rr_instance1 (shorter match)"
> +    }
> +    -re "type = $re_class${ws}$re_synth${ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
> +	# gcc 3.3.2 -gstabs+
> +	# TODO: enough with the "shorter match"
> +	pass "ptype foo_rr_instance1 (shorter match)"
> +    }
> +    -re "type = $re_class${ws}$re_ctor${ws}$re_dtor${ws}$re_methods${ws}$re_synth$nl\}$nl$gdb_prompt $" {
> +	# gcc HEAD -gstabs+ (abi-2)
> +	pass "ptype foo_rr_instance1 (shorter match)"
> +    }


Several references to TODOs and kfails, etc. that are likely
not really relevant here.  Can we clean this up?

(same comments apply to the other files).

Thanks,
Pedro Alves


  reply	other threads:[~2016-06-20 19:04 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-20 22:35 [PATCH 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Artemiy Volkov
2015-12-20 22:35 ` [PATCH 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2015-12-20 22:35 ` [PATCH 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2015-12-20 22:35 ` [PATCH 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2015-12-20 22:35 ` [PATCH 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_AT_rvalue_reference type Artemiy Volkov
2015-12-20 22:35 ` [PATCH 08/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2015-12-20 22:35 ` [PATCH 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2015-12-20 22:35 ` [PATCH 10/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2015-12-20 22:35 ` [PATCH 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2015-12-20 22:35 ` [PATCH 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Artemiy Volkov
2015-12-30 19:17   ` Pedro Alves
2015-12-20 22:35 ` [PATCH 09/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2015-12-20 22:35 ` [PATCH 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for rvalue reference type Artemiy Volkov
2015-12-28 21:09 ` [PATCH 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Artemiy Volkov
2016-01-20  9:42   ` Yao Qi
2016-01-19 18:54 ` [PATCH v2 " Artemiy Volkov
2016-01-19 18:54   ` [PATCH v2 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Artemiy Volkov
2016-02-19 18:54     ` Keith Seitz
2016-01-19 18:54   ` [PATCH v2 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2016-02-19 18:50     ` Keith Seitz
2016-01-19 18:54   ` [PATCH v2 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2016-02-19 18:53     ` Keith Seitz
2016-01-19 18:54   ` [PATCH v2 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for " Artemiy Volkov
2016-02-19 18:49     ` Keith Seitz
2016-02-23  7:04       ` Artemiy Volkov
2016-02-25  1:22         ` Keith Seitz
2016-02-25  1:32           ` Artemiy Volkov
2016-02-25  1:41             ` Keith Seitz
2016-02-25  1:45               ` Artemiy Volkov
2016-01-19 18:54   ` [PATCH v2 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2016-02-19 18:52     ` Keith Seitz
2016-01-19 18:54   ` [PATCH v2 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2016-02-19 18:56     ` Keith Seitz
2016-01-19 18:55   ` [PATCH v2 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2016-02-19 20:05     ` Keith Seitz
2016-01-19 18:55   ` [PATCH v2 10/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2016-02-19 19:48     ` Keith Seitz
2016-01-19 18:55   ` [PATCH v2 09/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2016-02-19 19:46     ` Keith Seitz
2016-01-19 18:55   ` [PATCH v2 08/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2016-02-19 19:01     ` Keith Seitz
2016-02-26  5:08       ` Artemiy Volkov
2016-01-19 18:55   ` [PATCH v2 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_AT_rvalue_reference type Artemiy Volkov
2016-02-19 18:57     ` Keith Seitz
2016-02-19 18:49   ` [PATCH v2 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Keith Seitz
2016-02-23  6:04     ` Artemiy Volkov
2016-03-05  3:20   ` [PATCH v3 " Artemiy Volkov
2016-03-05  3:20     ` [PATCH v3 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Artemiy Volkov
2016-03-16 22:25       ` Keith Seitz
2016-03-05  3:20     ` [PATCH v3 08/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2016-03-16 22:32       ` Keith Seitz
2016-03-05  3:20     ` [PATCH v3 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2016-03-16 22:19       ` Keith Seitz
2016-03-20 12:10         ` Artemiy Volkov
2016-03-05  3:20     ` [PATCH v3 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2016-03-16 22:26       ` Keith Seitz
2016-03-05  3:20     ` [PATCH v3 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for rvalue reference type Artemiy Volkov
2016-03-16 22:08       ` Keith Seitz
2016-03-05  3:20     ` [PATCH v3 09/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2016-03-16 22:41       ` Keith Seitz
2016-03-05  3:20     ` [PATCH v3 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_AT_rvalue_reference type Artemiy Volkov
2016-03-16 22:28       ` Keith Seitz
2016-03-05  3:20     ` [PATCH v3 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2016-03-16 22:23       ` Keith Seitz
2016-03-05  3:20     ` [PATCH v3 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2016-03-16 22:48       ` Keith Seitz
2016-03-05  3:20     ` [PATCH v3 10/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2016-03-16 22:45       ` Keith Seitz
2016-03-05  3:20     ` [PATCH v3 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2016-03-16 22:22       ` Keith Seitz
2016-03-21 21:02     ` [PATCH v4 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Artemiy Volkov
2016-03-21 21:02       ` [PATCH v4 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2016-03-21 21:02       ` [PATCH v4 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2016-03-21 21:02       ` [PATCH v4 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2016-03-21 21:02       ` [PATCH v4 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for rvalue reference type Artemiy Volkov
2016-03-21 21:02       ` [PATCH v4 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_TAG_rvalue_reference type Artemiy Volkov
2016-03-21 21:02       ` [PATCH v4 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2016-03-21 21:02       ` [PATCH v4 08/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2016-03-31 20:35         ` Keith Seitz
2016-04-02  8:28           ` Artemiy Volkov
2016-04-02  8:45             ` Artemiy Volkov
2016-03-21 21:03       ` [PATCH v4 09/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2016-03-31 20:37         ` Keith Seitz
2016-04-02  8:42           ` Artemiy Volkov
2016-03-21 21:03       ` [PATCH v4 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Artemiy Volkov
2016-03-21 21:03       ` [PATCH v4 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2016-03-21 21:15       ` [PATCH v4 10/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2016-03-31 20:35       ` [PATCH v4 00/11] [PR gdb/14441] Support C++0x rvalue references in gdb Keith Seitz
2016-04-02  8:48         ` Artemiy Volkov
2016-04-05 18:23           ` Pedro Alves
     [not found]             ` <20160406083016.GA31849@gmail.com>
2016-04-12 11:49               ` Pedro Alves
2016-04-19 15:51                 ` Artemiy Volkov
2016-04-22 11:31                   ` Pedro Alves
2016-06-06 19:22       ` [PATCH v5 00/11] [PR gdb/14441] Support C++11 " Artemiy Volkov
2016-06-06 19:23         ` [PATCH v5 05/11] [PR gdb/14441] gdb: demangle: implement demangling for rvalue reference typenames Artemiy Volkov
2016-06-06 19:23         ` [PATCH v5 10/11] [PR gdb/14441] gdb: gdbtypes: add rvalue references to overloading resolution Artemiy Volkov
2016-06-06 19:23         ` [PATCH v5 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref() Artemiy Volkov
2016-06-06 19:23         ` [PATCH v5 08/11] [PR gdb/14441] gdb: python: support rvalue references in the gdb module Artemiy Volkov
2016-06-20 19:07           ` Pedro Alves
2016-06-06 19:23         ` [PATCH v5 09/11] [PR gdb/14441] gdb: convert lvalue reference type check to general reference type check Artemiy Volkov
2016-06-06 19:23         ` [PATCH v5 04/11] [PR gdb/14441] gdb: parse: support rvalue reference type Artemiy Volkov
2016-06-06 19:23         ` [PATCH v5 06/11] [PR gdb/14441] gdb: print: implement correct printing of rvalue reference types and values Artemiy Volkov
2016-06-06 19:23         ` [PATCH v5 07/11] [PR gdb/14441] gdb: dwarf2read: support DW_TAG_rvalue_reference type Artemiy Volkov
2016-06-06 19:23         ` [PATCH v5 02/11] [PR gdb/14441] gdb: gdbtypes: change {lookup,make}_reference_type() API Artemiy Volkov
2016-06-06 19:23         ` [PATCH v5 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Artemiy Volkov
2016-06-20 19:04           ` Pedro Alves [this message]
2016-06-06 19:23         ` [PATCH v5 01/11] [PR gdb/14441] gdb: gdbtypes: add definitions for rvalue reference type Artemiy Volkov
2016-06-19 15:08         ` [PATCH v5 00/11] [PR gdb/14441] Support C++11 rvalue references in gdb Artemiy Volkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=706fb65c-cca9-9da0-8609-4b9748ccda69@redhat.com \
    --to=palves@redhat.com \
    --cc=artemiyv@acm.org \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox