Skip to content
Snippets Groups Projects
Commit c95c2dd3 authored by Thibault Martin's avatar Thibault Martin
Browse files

Do not display ghost code in proto/fun args when empty

parent d329832e
No related branches found
No related tags found
No related merge requests found
...@@ -253,6 +253,9 @@ and print_decl (n: string) fmt = function ...@@ -253,6 +253,9 @@ and print_decl (n: string) fmt = function
| ARRAY (d, al, e) -> | ARRAY (d, al, e) ->
fprintf fmt "%a[@[%a%a@]]" fprintf fmt "%a[@[%a%a@]]"
(print_decl n) d print_attributes al print_expression e (print_decl n) d print_attributes al print_expression e
| PROTO(d, args, [], isva) ->
fprintf fmt "@[%a@;(%a) @]"
(print_decl n) d print_params (args,isva)
| PROTO(d, args, ghost_args, isva) -> | PROTO(d, args, ghost_args, isva) ->
fprintf fmt "@[%a@;(%a) /*@@@ ghost (%a) */ @]" fprintf fmt "@[%a@;(%a) /*@@@ ghost (%a) */ @]"
(print_decl n) d print_params (args,isva) print_params (ghost_args, false) (print_decl n) d print_params (args,isva) print_params (ghost_args, false)
...@@ -380,6 +383,9 @@ and print_expression_level (lvl: int) fmt (exp : expression) = ...@@ -380,6 +383,9 @@ and print_expression_level (lvl: int) fmt (exp : expression) =
[arg; { expr_node = TYPE_SIZEOF (bt, dt) } ], _) -> [arg; { expr_node = TYPE_SIZEOF (bt, dt) } ], _) ->
fprintf fmt "__builtin_va_arg(@[%a,@ %a@])" fprintf fmt "__builtin_va_arg(@[%a,@ %a@])"
(print_expression_level 0) arg print_onlytype (bt, dt) (print_expression_level 0) arg print_onlytype (bt, dt)
| CALL (exp, args, []) ->
fprintf fmt "%a(@[@;%a@])"
print_expression exp print_comma_exps args
| CALL (exp, args, ghost_args) -> | CALL (exp, args, ghost_args) ->
fprintf fmt "%a(@[@;%a@]) /*@@@ ghost (@[@;%a@]) */" fprintf fmt "%a(@[@;%a@]) /*@@@ ghost (@[@;%a@]) */"
print_expression exp print_comma_exps args print_comma_exps ghost_args print_expression exp print_comma_exps args print_comma_exps ghost_args
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment