cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Jaskaran Singh <jaskaransingh7654321@gmail.com>
To: cocci@systeme.lip6.fr
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
	skhan@linuxfoundation.org
Subject: [Cocci] [PATCH 1/2] engine: remove circular references in MINUS/NOREPLACEMENT case
Date: Wed, 27 Nov 2019 23:08:14 +0530	[thread overview]
Message-ID: <20191127173815.24988-2-jaskaransingh7654321@gmail.com> (raw)
In-Reply-To: <20191127173815.24988-1-jaskaransingh7654321@gmail.com>

The cocci info tag can sometimes have circular references in the
MINUS/NOREPLACEMENT case in the transformation. Pass the binding
info through clean_env to remove circular references.

Signed-off-by: Jaskaran Singh <jaskaransingh7654321@gmail.com>
---
 engine/transformation_c.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/engine/transformation_c.ml b/engine/transformation_c.ml
index bcde08b8..9f0b0ab2 100644
--- a/engine/transformation_c.ml
+++ b/engine/transformation_c.ml
@@ -380,7 +380,7 @@ module XTRANS = struct
 	  (Ast_cocci.MINUS
 	     (old_pos,Common.union_set old_inst new_inst,old_adj,
 	      Ast_cocci.NOREPLACEMENT),
-	   [tin.binding]);
+	   [clean_env tin.binding]);
         (if !Flag_matcher.show_misc
         then pr2_once "already tagged but only removed, so safe")
 
-- 
2.21.0

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2019-11-27 17:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27 17:38 [Cocci] [PATCH 0/2] cocci: Fix continue statement of death and similar cases Jaskaran Singh
2019-11-27 17:38 ` Jaskaran Singh [this message]
2019-11-27 20:41   ` [Cocci] [PATCH 1/2] engine: remove circular references in MINUS/NOREPLACEMENT case Markus Elfring
2019-11-27 17:38 ` [Cocci] [PATCH 2/2] tests: Add test case for statement removed and added Jaskaran Singh
2019-11-27 20:43 ` [Cocci] [PATCH 0/2] cocci: Fix continue statement of death and similar cases Julia Lawall

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=20191127173815.24988-2-jaskaransingh7654321@gmail.com \
    --to=jaskaransingh7654321@gmail.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=skhan@linuxfoundation.org \
    /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 NNTP newsgroup(s).