MetaAttribute is added to the SmPL AST. Reflect these changes in
function_prototypes.ml.

Signed-off-by: Jaskaran Singh <jaskaran.si...@collabora.com>
---
 parsing_cocci/function_prototypes.ml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/parsing_cocci/function_prototypes.ml 
b/parsing_cocci/function_prototypes.ml
index 94dd2751a..8c6e559ac 100644
--- a/parsing_cocci/function_prototypes.ml
+++ b/parsing_cocci/function_prototypes.ml
@@ -167,6 +167,14 @@ and strip =
             Ast0.MetaParamList(nm,lenname,cstr,Ast0.Pure)
         | e -> e)) in
 
+  let attribute r k e =
+    donothing r k
+      (Ast0.rewrap e
+        (match Ast0.unwrap e with
+          Ast0.MetaAttribute(nm,cstr,pure) ->
+            Ast0.MetaAttribute(nm,cstr,Ast0.Pure)
+        | e -> e)) in
+
   V0.flat_rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
     mcode mcode
@@ -174,7 +182,7 @@ and strip =
     donothing donothing
     ident donothing donothing donothing typeC donothing param
     donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing
+    attribute donothing
 
 and changed_proto = function
     (mname,mdef,mproto,None) -> true
-- 
2.21.3

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to