[Linux-kernel-mentees] [Cocci] [PATCH 1/2] parsing_c: Align C AST and Cocci AST for pointers

Markus Elfring Markus.Elfring at web.de
Wed Feb 5 18:36:36 UTC 2020


…
> +++ b/parsing_c/pretty_print_c.ml
> @@ -804,11 +804,12 @@ and pp_string_format (e,ii) =
>               (FunctionType (return=void, params=int i) *)
>            (*WRONG I THINK, use left & right function *)
>            (* bug: pp_type_with_ident_rest None t;      print_ident ident *)
> +          pp_type_left t;
>            pr_elem i;
>            iiqu +> List.iter pr_elem; (* le const est forcement apres le '*' *)
>            if iiqu <> [] || get_comments_after i <> []
>            then pr_space();
> -          pp_type_with_ident_rest ident t attrs Ast_c.noattr;
> +          print_ident ident
>
>        (* ugly special case ... todo? maybe sufficient in practice *)
>        | (ParenType ttop, [i1;i2]) ->

Are the source code comments still appropriate for this patch hunk?

Regards,
Markus


More information about the Linux-kernel-mentees mailing list