The following commit introduced some poor management of attributes in
unify_ast.ml:
        b4b8653bd5a9607922e0050fe2fede10d422b218
Apply unify_mcode on macrodecl attributes in unify_ast.ml.

Signed-off-by: Jaskaran Singh <[email protected]>
---
 parsing_cocci/unify_ast.ml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/parsing_cocci/unify_ast.ml b/parsing_cocci/unify_ast.ml
index 752e9283..788c8fdc 100644
--- a/parsing_cocci/unify_ast.ml
+++ b/parsing_cocci/unify_ast.ml
@@ -413,7 +413,8 @@ and unify_declaration d1 d2 =
        else false
   | (Ast.MacroDecl(s1,n1,lp1,args1,rp1,attr1,sem1),
      Ast.MacroDecl(s2,n2,lp2,args2,rp2,attr2,sem2)) ->
-       if bool_unify_option unify_mcode s1 s2
+       if bool_unify_option unify_mcode s1 s2 &&
+         List.for_all2 unify_mcode attr1 attr2
        then
         unify_ident n1 n2 &&
         unify_dots unify_expression edots args1 args2
-- 
2.21.1

_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to