Macrodecl attributes are added to the SmPL AST. Reflect these changes in iso_pattern.ml.
Signed-off-by: Jaskaran Singh <jaskaransingh7654...@gmail.com> --- parsing_cocci/iso_pattern.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/parsing_cocci/iso_pattern.ml b/parsing_cocci/iso_pattern.ml index 9df21fb9..ebb83e23 100644 --- a/parsing_cocci/iso_pattern.ml +++ b/parsing_cocci/iso_pattern.ml @@ -965,9 +965,12 @@ let match_maker checks_needed context_required whencode_allowed = params1 params; match_option varargs_equal va1a va1b ] - | (Ast0.MacroDecl(stga,namea,lp1,argsa,rp1,sc1), - Ast0.MacroDecl(stgb,nameb,lp,argsb,rp,sc)) -> - if bool_match_option mcode_equal stga stgb + | (Ast0.MacroDecl(stga,namea,lp1,argsa,rp1,attra,sc1), + Ast0.MacroDecl(stgb,nameb,lp,argsb,rp,attrb,sc)) -> + if bool_match_option mcode_equal stga stgb && + (List.length attra = List.length attrb && + List.fold_left2 (fun p a b -> p && mcode_equal a b) true + attra attrb) (* no metavars *) then conjunct_many_bindings [match_ident namea nameb; -- 2.21.1 _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci