@ -542,23 +542,21 @@ and get_template_info tenv (fdi : Clang_ast_t.function_decl_info) =
and mk_c_function ? tenv name function_decl_info_opt parameters =
and mk_c_function ? tenv name function_decl_info_opt parameters =
let file =
let file =
match function_decl_info_opt with
match function_decl_info_opt with
| Some ( decl_info , function_decl_info ) -> (
(* when we model static functions, we cannot take the file into account to
match function_decl_info . Clang_ast_t . fdi_storage_class with
create a mangled name because the file of the model is different to the real file ,
| Some " static "
thus the model won't work * )
(* when we model static functions, we cannot take the file into account to
| Some ( decl_info , function_decl_info )
create a mangled name because the file of the model is different to the real file ,
when function_decl_info . Clang_ast_t . fdi_is_static
thus the model won't work * )
&& not
when not ( CTrans_models . is_modelled_static_function ( QualifiedCppName . to_qual_string name ) )
( CTrans_models . is_modelled_static_function ( QualifiedCppName . to_qual_string name ) )
->
->
let file_opt =
let file_opt =
( fst decl_info . Clang_ast_t . di_source_range ) . Clang_ast_t . sl_file
( fst decl_info . Clang_ast_t . di_source_range ) . Clang_ast_t . sl_file
| > Option . map ~ f : SourceFile . from_abs_path
| > Option . map ~ f : SourceFile . from_abs_path
in
in
let file_to_hex src = SourceFile . to_string src | > Utils . string_crc_hex32 in
let file_to_hex src = SourceFile . to_string src | > Utils . string_crc_hex32 in
Option . value_map ~ f : file_to_hex ~ default : " " file_opt
Option . value_map ~ f : file_to_hex ~ default : " " file_opt
| _ ->
| _ ->
" " )
| None ->
" "
" "
in
in
let mangled_opt , is_cpp =
let mangled_opt , is_cpp =