[Linux-kernel-mentees] [PATCH v3 11/26] parsing_cocci: function_prototypes: Add cases for ParenType/FunctionType

Jaskaran Singh jaskaransingh7654321 at gmail.com
Fri Mar 20 07:01:42 UTC 2020


ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in function_prototypes.ml.

Signed-off-by: Jaskaran Singh <jaskaransingh7654321 at gmail.com>
---
 parsing_cocci/function_prototypes.ml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/parsing_cocci/function_prototypes.ml b/parsing_cocci/function_prototypes.ml
index 2e6eea43..fd36f31b 100644
--- a/parsing_cocci/function_prototypes.ml
+++ b/parsing_cocci/function_prototypes.ml
@@ -229,6 +229,10 @@ let rec attach_right strings ty =
     | Ast0.FunctionPointer(ty,lp,star,rp,lp1,ps,rp1) ->
 	Ast0.FunctionPointer(ty,lp,star,rp,lp1,ps,
 			     right_attach_mcode strings rp1)
+    | Ast0.ParenType(lp,ty,rp) ->
+	Ast0.ParenType(lp,ty,right_attach_mcode strings rp)
+    | Ast0.FunctionType(ty,lp,ps,rp) ->
+	Ast0.FunctionType(ty,lp,ps,right_attach_mcode strings rp)
     | Ast0.Array(ty,lb,e,rb) ->
 	Ast0.Array(ty,lb,e,right_attach_mcode strings rb)
     | Ast0.Decimal(dec,lp,e1,comma,e2,rp) ->
-- 
2.21.1



More information about the Linux-kernel-mentees mailing list