From: David Malcolm <dmalcolm@redhat.com>
To: Lewis Hyatt <lhyatt@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v4 5/8] diagnostics: Support testing generated data in input.cc selftests
Date: Tue, 15 Aug 2023 12:27:01 -0400 [thread overview]
Message-ID: <bb62e1db260fb414244f33d81c66fcec09a8d6e2.camel@redhat.com> (raw)
In-Reply-To: <20230809221414.2849878-6-lhyatt@gmail.com>
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
> Add selftests for the new capabilities in input.cc related to source code
> locations that are stored in memory rather than ordinary files.
>
> gcc/ChangeLog:
>
> * input.cc (temp_source_file::do_linemap_add): New function.
> (line_table_case::line_table_case): Add GENERATED_DATA argument.
> (line_table_test::line_table_test): Implement new M_GENERATED_DATA
> argument.
> (for_each_line_table_case): Optionally include generated data
> locations in the set of cases.
> (test_accessing_ordinary_linemaps): Test generated data locations.
> (test_make_location_nonpure_range_endpoints): Likewise.
> (test_line_offset_overflow): Likewise.
> (input_cc_tests): Likewise.
> * selftest.cc (named_temp_file::named_temp_file): Interpret a null
> SUFFIX argument as a request to use in-memory data.
> (named_temp_file::~named_temp_file): Support in-memory data.
> (temp_source_file::temp_source_file): Likewise.
> (temp_source_file::~temp_source_file): Likewise.
> * selftest.h (struct line_map_ordinary): Foward declare.
> (class named_temp_file): Add missing explicit to the constructor.
> (class temp_source_file): Add new members to support in-memory data.
> (class line_table_test): Likewise.
> (for_each_line_table_case): Adjust prototype.
> ---
> gcc/input.cc | 81 +++++++++++++++++++++++++++++++++----------------
> gcc/selftest.cc | 53 +++++++++++++++++++++++++-------
> gcc/selftest.h | 19 ++++++++++--
> 3 files changed, 113 insertions(+), 40 deletions(-)
>
Thanks; looks good to me.
Dave
next prev parent reply other threads:[~2023-08-15 16:27 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 23:08 [PATCH v3 0/4] diagnostics: libcpp: Overhaul locations for _Pragma tokens Lewis Hyatt
2023-07-21 23:08 ` [PATCH v3 1/4] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers Lewis Hyatt
2023-07-28 22:58 ` David Malcolm
2023-07-31 22:39 ` Lewis Hyatt
2023-08-09 22:14 ` [PATCH v4 0/8] diagnostics: libcpp: Overhaul locations for _Pragma tokens Lewis Hyatt
2023-08-09 22:14 ` [PATCH v4 1/8] libcpp: Add LC_GEN linemaps to support in-memory buffers Lewis Hyatt
2023-08-11 22:45 ` David Malcolm
2023-08-13 20:18 ` Lewis Hyatt
2023-08-09 22:14 ` [PATCH v4 2/8] libcpp: diagnostics: Support generated data in expanded locations Lewis Hyatt
2023-08-11 23:02 ` David Malcolm
2023-08-14 21:41 ` Lewis Hyatt
2023-08-09 22:14 ` [PATCH v4 3/8] diagnostics: Refactor class file_cache_slot Lewis Hyatt
2023-08-15 15:43 ` David Malcolm
2023-08-15 17:58 ` Lewis Hyatt
2023-08-15 19:39 ` David Malcolm
2023-08-23 21:22 ` Lewis Hyatt
2023-08-09 22:14 ` [PATCH v4 4/8] diagnostics: Support obtaining source code lines from generated data buffers Lewis Hyatt
2023-08-15 16:15 ` David Malcolm
2023-08-15 18:15 ` Lewis Hyatt
2023-08-15 19:46 ` David Malcolm
2023-08-15 20:08 ` Lewis Hyatt
2023-08-23 19:41 ` Lewis Hyatt
2023-08-09 22:14 ` [PATCH v4 5/8] diagnostics: Support testing generated data in input.cc selftests Lewis Hyatt
2023-08-15 16:27 ` David Malcolm [this message]
2023-08-09 22:14 ` [PATCH v4 6/8] diagnostics: Full support for generated data locations Lewis Hyatt
2023-08-15 16:39 ` David Malcolm
2023-08-09 22:14 ` [PATCH v4 7/8] diagnostics: libcpp: Assign real locations to the tokens inside _Pragma strings Lewis Hyatt
2023-08-09 22:14 ` [PATCH v4 8/8] diagnostics: Support generated data locations in SARIF output Lewis Hyatt
2023-08-15 17:04 ` David Malcolm
2023-08-15 17:51 ` Lewis Hyatt
2023-07-21 23:08 ` [PATCH v3 2/4] diagnostics: Handle generated data locations in edit_context Lewis Hyatt
2023-07-21 23:08 ` [PATCH v3 3/4] diagnostics: libcpp: Assign real locations to the tokens inside _Pragma strings Lewis Hyatt
2023-07-21 23:08 ` [PATCH v3 4/4] diagnostics: Support generated data locations in SARIF output Lewis Hyatt
2023-07-28 22:22 ` [PATCH v3 0/4] diagnostics: libcpp: Overhaul locations for _Pragma tokens David Malcolm
2023-07-29 14:27 ` Lewis Hyatt
2023-07-29 16:03 ` David Malcolm
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=bb62e1db260fb414244f33d81c66fcec09a8d6e2.camel@redhat.com \
--to=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=lhyatt@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).