Attributes are wrapped in the SmPL AST. Reflect these changes in safe_for_multi_decls.ml.
Signed-off-by: Jaskaran Singh <[email protected]> --- parsing_cocci/safe_for_multi_decls.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/safe_for_multi_decls.ml b/parsing_cocci/safe_for_multi_decls.ml index 8fc49432..70335abb 100644 --- a/parsing_cocci/safe_for_multi_decls.ml +++ b/parsing_cocci/safe_for_multi_decls.ml @@ -103,6 +103,10 @@ let contains_modif = do_nothing in recursor.V.combiner_fullType +let attribute a = + match Ast.unwrap a with + Ast.Attribute(attr) -> mcode () attr + let decl r k e = let e = k e in match all_removed_decl e with @@ -116,7 +120,7 @@ let decl r k e = match stg with Some stg -> mcode () stg | None -> false in - let attr_modif = List.exists (mcode ()) attr in + let attr_modif = List.exists attribute attr in let ft_modif = contains_modif ty in let sem_modif = mcode () sem in if not(stg_modif || attr_modif || ft_modif || sem_modif) -- 2.21.3 _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
