public inbox for
 help / color / mirror / Atom feed
From: Dodji Seketeli <>
Subject: [PATCH, applied] ir: Support cloning data members of unions
Date: Thu, 22 Sep 2022 16:51:04 +0200	[thread overview]
Message-ID: <> (raw)


When cloning a data member, var_decl::clone wrongly assumes we are
looking at a data member of a class.  It could also be a data member
of an union.  Fixed thus.

This fixes crashes when self comparing Fedora 36 packages of the qt6
group with the command:

    $ fedabipkgdiff --self-compare --from fc36 qt6-qtsensors

There are lot of other packages from the qt group that were making
this command fail, but I am not mentioning them here for the sake

	* src/ (var_decl::clone): Support cloning data members
	for unions.

Signed-off-by: Dodji Seketeli <>
Applied to master.
 src/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ b/src/
index 1cd2a219..f739b126 100644
--- a/src/
+++ b/src/
@@ -19131,7 +19131,7 @@ var_decl::clone() const
   if (is_member_decl(*this))
-      class_decl* scope = dynamic_cast<class_decl*>(get_scope());
+      class_or_union* scope = is_class_or_union_type(get_scope());
       scope->add_data_member(v, get_member_access_specifier(*this),


                 reply	other threads:[~2022-09-22 14:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \ \ \ \ \

* 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).