[Linux-kernel-mentees] [PATCH 18/27] parsing_cocci: unify_ast: Reflect struct end attributes
Jaskaran Singh
jaskaransingh7654321 at gmail.com
Sun May 31 15:26:12 UTC 2020
Struct end attributes are added to the SmPL AST. Reflect these changes
in unify_ast.ml.
Signed-off-by: Jaskaran Singh <jaskaransingh7654321 at gmail.com>
---
parsing_cocci/unify_ast.ml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/unify_ast.ml b/parsing_cocci/unify_ast.ml
index e36c0807..752e9283 100644
--- a/parsing_cocci/unify_ast.ml
+++ b/parsing_cocci/unify_ast.ml
@@ -426,7 +426,10 @@ and unify_declaration d1 d2 =
unify_dots unify_expression edots args1 args2 &&
unify_initialiser ini1 ini2
else false
- | (Ast.TyDecl(ft1,s1),Ast.TyDecl(ft2,s2)) -> unify_fullType ft1 ft2
+ | (Ast.TyDecl(ft1,attr1,s1),Ast.TyDecl(ft2,attr2,s2)) ->
+ if List.for_all2 unify_mcode attr1 attr2
+ then unify_fullType ft1 ft2
+ else false
| (Ast.Typedef(stg1,ft1,id1,s1),Ast.Typedef(stg2,ft2,id2,s2)) ->
unify_fullType ft1 ft2 && unify_typeC id1 id2
| (Ast.DisjDecl(d1),_) ->
--
2.21.1
More information about the Linux-kernel-mentees
mailing list