From: Eric Feng <ef2648@columbia.edu>
To: Marek Polacek <polacek@redhat.com>
Cc: David Malcolm <dmalcolm@redhat.com>,
gcc-patches@gcc.gnu.org, joseph@codesourcery.com
Subject: Re: [PATCH v2] analyzer: stash values for CPython plugin [PR107646]
Date: Wed, 2 Aug 2023 14:46:57 -0400 [thread overview]
Message-ID: <CANGHATW2oZ0GZPA=C1u2V7_6i1+brKd-qcba=K9fnZEpENaj+g@mail.gmail.com> (raw)
In-Reply-To: <ZMqQPTCYrIU1x6hh@redhat.com>
On Wed, Aug 2, 2023 at 1:20 PM Marek Polacek <polacek@redhat.com> wrote:
>
> On Wed, Aug 02, 2023 at 12:59:28PM -0400, David Malcolm wrote:
> > On Wed, 2023-08-02 at 12:20 -0400, Eric Feng wrote:
> >
> > Hi Eric, thanks for the updated patch.
> >
> > Overall, looks good to me, although I'd drop the "Exited." from the
> > "sorry" message (and thus from the dg-message directive), since the
> > compiler is not exiting, it's just the particular plugin that's giving
> > up (but let's not hold up the patch with a "bikeshed" discussion on the
> > precise wording).
> >
> > If Joseph or Marek approves the C parts of the patch, this will be OK
> > to push to trunk.
>
Sounds good. Revised.
>
> > > index cf82b0306d1..617111b0f0a 100644
> > > --- a/gcc/c/c-parser.cc
> > > +++ b/gcc/c/c-parser.cc
> > > @@ -1695,6 +1695,32 @@ public:
> > > return NULL_TREE;
> > > }
> > >
> > > + tree
> > > + lookup_type_by_id (tree id) const final override
> > > + {
> > > + if (tree type_decl = lookup_name (id))
> > > + {
> > > + if (TREE_CODE (type_decl) == TYPE_DECL)
> > > + {
> > > + tree record_type = TREE_TYPE (type_decl);
> > > + if (TREE_CODE (record_type) == RECORD_TYPE)
> > > + return record_type;
> > > + }
> > > + }
>
> I'd drop this set of { }, like below. OK with that adjusted, thanks.
Sounds good — fixed.
>
> > > +
> > > + return NULL_TREE;
> > > + }
> > > +
> > > + tree
> > > + lookup_global_var_by_id (tree id) const final override
> > > + {
> > > + if (tree var_decl = lookup_name (id))
> > > + if (TREE_CODE (var_decl) == VAR_DECL)
> > > + return var_decl;
> > > +
> > > + return NULL_TREE;
> > > + }
> > > +
> > > private:
> > > /* Attempt to get an INTEGER_CST from MACRO.
> > > Only handle the simplest cases: where MACRO's definition is a
>
> Marek
>
Thank you, everyone. I've submitted a new patch with the described
changes. As I do not yet have write access, could someone please help
me commit it? Otherwise, please let me know if I should request write
access first (the GettingStarted page suggested requesting someone
commit the patch for the first few patches before requesting write
access).
Best,
Eric
next prev parent reply other threads:[~2023-08-02 18:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 13:52 [PATCH] " Eric Feng
2023-08-01 17:02 ` David Malcolm
2023-08-02 16:20 ` [PATCH v2] " Eric Feng
2023-08-02 16:59 ` David Malcolm
2023-08-02 17:19 ` Marek Polacek
2023-08-02 18:45 ` [PATCH v3] " Eric Feng
2023-08-02 18:46 ` Eric Feng [this message]
2023-08-02 21:09 ` [PATCH v2] " David Malcolm
2023-08-03 15:28 ` Eric Feng
2023-08-03 15:36 ` David Malcolm
2023-08-02 16:27 ` [PATCH] " Eric Feng
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='CANGHATW2oZ0GZPA=C1u2V7_6i1+brKd-qcba=K9fnZEpENaj+g@mail.gmail.com' \
--to=ef2648@columbia.edu \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=polacek@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).