Parameter attributes are added to the C AST. Add an expression to check if attributes are equal on both sides to the parameter case in c_vs_c.
Signed-off-by: Jaskaran Singh <jaskaransingh7654...@gmail.com> --- engine/c_vs_c.ml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/engine/c_vs_c.ml b/engine/c_vs_c.ml index e2bd7408..b569c244 100644 --- a/engine/c_vs_c.ml +++ b/engine/c_vs_c.ml @@ -135,9 +135,11 @@ and typeC tya tyb = let iix = iia in acc >>= (fun xs -> - let {p_register = (ba,iiba); p_namei = saopt; p_type = ta} = + let {p_register = (ba,iiba); p_namei = saopt; p_type = ta; + p_attr = attrsa} = parama in - let {p_register = (bb,iibb); p_namei = sbopt; p_type = tb} = + let {p_register = (bb,iibb); p_namei = sbopt; p_type = tb; + p_attr = attrsb} = paramb in let bx = ba in @@ -145,13 +147,15 @@ and typeC tya tyb = let sxopt = saopt in + let attrsx = attrsa in (* todo? iso on name or argument ? *) - (ba = bb && same_s saopt sbopt) >&&> + (ba = bb && same_s saopt sbopt && attrsa = attrsb) >&&> fullType ta tb >>= (fun tx -> let paramx = { p_register = (bx, iibx); p_namei = sxopt; - p_type = tx; } in + p_type = tx; + p_attr = attrsx; } in return ((paramx,iix)::xs) ) ) -- 2.21.1 _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci