Cast attributes are added to the SmPL AST. Reflect these changes in arity.ml.
Signed-off-by: Jaskaran Singh <[email protected]> --- parsing_cocci/arity.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parsing_cocci/arity.ml b/parsing_cocci/arity.ml index 8ee6d33f..880cd7a3 100644 --- a/parsing_cocci/arity.ml +++ b/parsing_cocci/arity.ml @@ -254,13 +254,14 @@ let rec top_expression opt_allowed tgt expr = let ar = mcode ar in let field = ident false arity field in make_exp expr tgt arity (Ast0.RecordPtAccess(exp,ar,field)) - | Ast0.Cast(lp,ty,rp,exp) -> + | Ast0.Cast(lp,ty,attr,rp,exp) -> let arity = exp_same (mcode2line lp) [mcode2arity lp;mcode2arity rp] in let lp = mcode lp in let ty = typeC arity ty in + let attr = List.map mcode attr in let rp = mcode rp in let exp = expression arity exp in - make_exp expr tgt arity (Ast0.Cast(lp,ty,rp,exp)) + make_exp expr tgt arity (Ast0.Cast(lp,ty,attr,rp,exp)) | Ast0.SizeOfExpr(szf,exp) -> let arity = exp_same (mcode2line szf) [mcode2arity szf] in let szf = mcode szf in -- 2.21.1 _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
