Skip to content
Snippets Groups Projects
Commit 7eeb8a63 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[variadic] do not translate registered builtin functions

parent 0f30bcd1
No related branches found
No related tags found
No related merge requests found
...@@ -148,7 +148,7 @@ let classify_std env vi = match vi.vname with ...@@ -148,7 +148,7 @@ let classify_std env vi = match vi.vname with
(* stropts.h *) (* stropts.h *)
| "ioctl" -> mk_overload env ["__va_ioctl_void" ; "__va_ioctl_int" ; "__va_ioctl_ptr"] | "ioctl" -> mk_overload env ["__va_ioctl_void" ; "__va_ioctl_int" ; "__va_ioctl_ptr"]
| n when Cil_builtins.Builtin_functions.mem n -> Builtin
(* Anything else *) (* Anything else *)
| _ -> Unknown | _ -> Unknown
......
...@@ -35,6 +35,7 @@ let va_builtins = [ ...@@ -35,6 +35,7 @@ let va_builtins = [
let is_framac_builtin vi = let is_framac_builtin vi =
Ast_info.is_frama_c_builtin vi.vname || Ast_info.is_frama_c_builtin vi.vname ||
Cil_builtins.Builtin_functions.mem vi.vname ||
Extlib.string_prefix "__FRAMAC_" vi.vname (* Mthread prefixes *) Extlib.string_prefix "__FRAMAC_" vi.vname (* Mthread prefixes *)
...@@ -147,6 +148,7 @@ let translate_variadics (file : file) = ...@@ -147,6 +148,7 @@ let translate_variadics (file : file) =
| Overload o -> Standard.overloaded_call ~fundec o | Overload o -> Standard.overloaded_call ~fundec o
| Aggregator a -> Standard.aggregator_call ~fundec ~ghost a | Aggregator a -> Standard.aggregator_call ~fundec ~ghost a
| FormatFun f -> Standard.format_fun_call ~fundec env f | FormatFun f -> Standard.format_fun_call ~fundec env f
| Builtin -> raise Not_found
| _ -> raise Standard.Translate_call_exn | _ -> raise Standard.Translate_call_exn
in in
call_translator block loc mk_call vf args call_translator block loc mk_call vf args
......
...@@ -26,6 +26,8 @@ open Cil_types ...@@ -26,6 +26,8 @@ open Cil_types
type variadic_class = type variadic_class =
| Unknown | Unknown
(** Function declared and not known by Frama-C *) (** Function declared and not known by Frama-C *)
| Builtin
(** Function registered as a builtin function in Cil_builtins *)
| Defined | Defined
(** Function for which we have the definition in the project *) (** Function for which we have the definition in the project *)
| Misc | Misc
......
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