[Linux-kernel-mentees] [PATCH 19/27] parsing_cocci: ast0toast: Reflect struct end attributes
Jaskaran Singh
jaskaransingh7654321 at gmail.com
Sun May 31 15:26:13 UTC 2020
Struct end attributes are added to the SmPL AST. Reflect these changes
in ast0toast.ml.
Signed-off-by: Jaskaran Singh <jaskaransingh7654321 at gmail.com>
---
parsing_cocci/ast0toast.ml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/parsing_cocci/ast0toast.ml b/parsing_cocci/ast0toast.ml
index 30e27cc5..cba32af6 100644
--- a/parsing_cocci/ast0toast.ml
+++ b/parsing_cocci/ast0toast.ml
@@ -679,9 +679,10 @@ and declaration d =
let ini = initialiser ini in
let sem = mcode sem in
Ast.MacroDeclInit(stg,name,lp,args,rp,eq,ini,sem)
- | Ast0.TyDecl(ty,sem) ->
+ | Ast0.TyDecl(ty,attr,sem) ->
let allminus = check_allminus.VT0.combiner_rec_declaration d in
- Ast.TyDecl(typeC allminus ty,mcode sem)
+ let attr = List.map mcode attr in
+ Ast.TyDecl(typeC allminus ty,attr,mcode sem)
| Ast0.Typedef(stg,ty,id,sem) ->
let allminus = check_allminus.VT0.combiner_rec_declaration d in
let id = typeC allminus id in
--
2.21.1
More information about the Linux-kernel-mentees
mailing list