Re: [Cocci] [PATCH 1/2] engine: remove circular references in MINUS/NOREPLACEMENT case

2019-11-27 Thread Markus Elfring
Thanks for your patch.


> The cocci info tag can sometimes have circular references in the
> MINUS/NOREPLACEMENT case in the transformation.

Can it make sense to clarify this software situation a bit more?


> Pass the binding info through clean_env to remove circular references.

Can such an additional function call be eventually avoided?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


[Cocci] [PATCH 1/2] engine: remove circular references in MINUS/NOREPLACEMENT case

2019-11-27 Thread Jaskaran Singh
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 
---
 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