From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 5/5] Adapt and integrate string_view tests
Date: Fri, 06 Apr 2018 18:20:00 -0000 [thread overview]
Message-ID: <17975722-e9f3-98d8-3187-4eb9649dac28@redhat.com> (raw)
In-Reply-To: <20180330214647.485-5-simon.marchi@polymtl.ca>
On 03/30/2018 10:46 PM, Simon Marchi wrote:
> - try
> +
> + bool threw = false;
> + TRY
> {
> str01.at(csz01);
> VERIFY( false ); // Should not get here, as exception thrown.
> }
> - catch (std::out_of_range& fail)
> - {
> - VERIFY( true );
> - }
> - catch (...)
> + CATCH (ex, RETURN_MASK_ALL)
Do we really need to replace the try/catch with TRY/CATCH?
The latter must be used throughout GDB because the code inside
the try statement can use cleanups, but here nothing is ever
going to use cleanups.
> +
> +/* The actual tests live in separate files, which were originally
> + copied over from libstdc++'s testsuite. To preserve the structure
> + and help with comparison with the original tests, the file names
> + have been preserved, and only minimal modification was done to have
> + them compile against gdb::optional instead of std::optional:
> +
> + - std::optional->gdb:optional, etc.
> + - ATTRIBUTE_UNUSED in a few places
> + - wrap each file in a namespace so they can all be compiled as a
> + single unit.
> + - libstdc++'s license and formatting style was preserved.
copy/pasto, optional->string_view. :-)
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-04-06 18:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-30 21:47 [PATCH v2 1/5] Update ax_cv_cxx_compile_cxx.m4 Simon Marchi
2018-03-30 21:47 ` [PATCH v2 2/5] Copy string_view files from libstdc++ Simon Marchi
2018-03-30 21:47 ` [PATCH v2 3/5] Add gdb::string_view Simon Marchi
2018-04-06 18:08 ` Pedro Alves
2018-04-06 20:37 ` Simon Marchi
2018-04-06 22:01 ` Pedro Alves
2018-03-30 21:47 ` [PATCH v2 5/5] Adapt and integrate string_view tests Simon Marchi
2018-04-06 18:20 ` Pedro Alves [this message]
2018-03-30 21:47 ` [PATCH v2 4/5] Copy string_view tests from libstdc++ Simon Marchi
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=17975722-e9f3-98d8-3187-4eb9649dac28@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).