[Linux-kernel-mentees] [PATCH 19/26] parsing_cocci: disjdistr: Add cases for ParenType/FunctionType
Jaskaran Singh
jaskaransingh7654321 at gmail.com
Mon Mar 16 10:03:12 UTC 2020
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in disjdistr.ml.
Signed-off-by: Jaskaran Singh <jaskaransingh7654321 at gmail.com>
---
parsing_cocci/disjdistr.ml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/parsing_cocci/disjdistr.ml b/parsing_cocci/disjdistr.ml
index 668a8810..91d7f1b8 100644
--- a/parsing_cocci/disjdistr.ml
+++ b/parsing_cocci/disjdistr.ml
@@ -73,6 +73,16 @@ and disjtypeC bty =
(function ty ->
Ast.rewrap bty (Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2)))
ty
+ | Ast.ParenType(lp,ty,rp) ->
+ let ty = disjty ty in
+ List.map
+ (function ty ->
+ Ast.rewrap bty (Ast.ParenType(lp,ty,rp))) ty
+ | Ast.FunctionType(ty,lp,params,rp) ->
+ let ty = disjty ty in
+ List.map
+ (function ty ->
+ Ast.rewrap bty (Ast.FunctionType(ty,lp,params,rp))) ty
| Ast.Array(ty,lb,size,rb) ->
disjmult2 (disjty ty) (disjoption disjexp size)
(function ty -> function size ->
--
2.21.1
More information about the Linux-kernel-mentees
mailing list