[Linux-kernel-mentees] [PATCH 11/32] parsing_cocci: compute_lines: Reflect Cast attributes
Jaskaran Singh
jaskaransingh7654321 at gmail.com
Tue Apr 28 17:02:07 UTC 2020
Cast attributes are added to the SmPL AST. Reflect these changes in
compute_lines.ml.
Signed-off-by: Jaskaran Singh <jaskaransingh7654321 at gmail.com>
---
parsing_cocci/compute_lines.ml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/parsing_cocci/compute_lines.ml b/parsing_cocci/compute_lines.ml
index 1361d842..e945914b 100644
--- a/parsing_cocci/compute_lines.ml
+++ b/parsing_cocci/compute_lines.ml
@@ -425,11 +425,12 @@ let rec expression e =
let ar = normal_mcode ar in
let field = ident field in
mkres e (Ast0.RecordPtAccess(exp,ar,field)) exp field
- | Ast0.Cast(lp,ty,rp,exp) ->
+ | Ast0.Cast(lp,ty,attr,rp,exp) ->
let lp = normal_mcode lp in
let exp = expression exp in
+ let attr = List.map normal_mcode attr in
let rp = normal_mcode rp in
- mkres e (Ast0.Cast(lp,typeC ty,rp,exp)) (promote_mcode lp) exp
+ mkres e (Ast0.Cast(lp,typeC ty,attr,rp,exp)) (promote_mcode lp) exp
| Ast0.SizeOfExpr(szf,exp) ->
let szf = normal_mcode szf in
let exp = expression exp in
--
2.21.1
More information about the Linux-kernel-mentees
mailing list