[Linux-kernel-mentees] [PATCH v2 29/32] tools: spgen: Reflect Cast attrs
From: Jaskaran Singh <hidden>
Date: 2020-05-11 10:09:57
Also in:
cocci
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Jaskaran Singh <hidden>
Date: 2020-05-11 10:09:57
Also in:
cocci
Subsystem:
the rest · Maintainer:
Linus Torvalds
Cast attributes are added to the SmPL AST. Reflect these changes in position_generator.ml. Signed-off-by: Jaskaran Singh <redacted> --- tools/spgen/source/position_generator.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/spgen/source/position_generator.ml b/tools/spgen/source/position_generator.ml
index 757faf5f..9143a474 100644
--- a/tools/spgen/source/position_generator.ml
+++ b/tools/spgen/source/position_generator.ml@@ -359,9 +359,9 @@ let rec expression_pos exp snp let c ~exp ~id = Ast0.RecordPtAccess(exp, arrow, id) in let alt() = id_wrap ~id ~constructor:(c ~exp) snp in exp_wrap ~exp ~constructor:(c ~id) ~alt snp - | Ast0.Cast(lp, typec, rp, exp) -> + | Ast0.Cast(lp, typec, attr, rp, exp) -> let _ = type_pos typec snp in (* sanity check for disj *) - let c ~exp ~mc = Ast0.Cast(lp, typec, mc, exp) in + let c ~exp ~mc = Ast0.Cast(lp, typec, attr, mc, exp) in let alt() = mcode_wrap ~mc:rp ~constructor:(c ~exp) snp in exp_wrap ~exp ~constructor:(c ~mc:rp) ~alt snp | Ast0.SizeOfExpr(sizeofmc, exp) ->
--
2.21.1
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees