|
|
@ -432,23 +432,17 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
|
|
|
|
(* The stmt seems to be always empty *)
|
|
|
|
(* The stmt seems to be always empty *)
|
|
|
|
let unaryExprOrTypeTraitExpr_trans trans_state expr_info unary_expr_or_type_trait_expr_info =
|
|
|
|
let unaryExprOrTypeTraitExpr_trans trans_state expr_info unary_expr_or_type_trait_expr_info =
|
|
|
|
let tenv = trans_state.context.CContext.tenv in
|
|
|
|
let tenv = trans_state.context.CContext.tenv in
|
|
|
|
let typ = CType_decl.qual_type_to_sil_type tenv expr_info.Clang_ast_t.ei_qual_type in
|
|
|
|
|
|
|
|
match unary_expr_or_type_trait_expr_info.Clang_ast_t.uttei_kind with
|
|
|
|
match unary_expr_or_type_trait_expr_info.Clang_ast_t.uttei_kind with
|
|
|
|
| (`SizeOf | `SizeOfWithSize _) as size ->
|
|
|
|
| (`SizeOf | `SizeOfWithSize _) as size ->
|
|
|
|
let qt_opt =
|
|
|
|
let qt = unary_expr_or_type_trait_expr_info.Clang_ast_t.uttei_qual_type in
|
|
|
|
CAst_utils.type_from_unary_expr_or_type_trait_expr_info
|
|
|
|
let sizeof_typ = CType_decl.qual_type_to_sil_type tenv qt in
|
|
|
|
unary_expr_or_type_trait_expr_info
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
let sizeof_typ =
|
|
|
|
|
|
|
|
match qt_opt with Some qt -> CType_decl.qual_type_to_sil_type tenv qt | None -> typ
|
|
|
|
|
|
|
|
(* Some default type since the type is missing *)
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
let nbytes = match size with `SizeOfWithSize nbytes -> Some nbytes | _ -> None in
|
|
|
|
let nbytes = match size with `SizeOfWithSize nbytes -> Some nbytes | _ -> None in
|
|
|
|
let sizeof_data =
|
|
|
|
let sizeof_data =
|
|
|
|
{Exp.typ= sizeof_typ; nbytes; dynamic_length= None; subtype= Subtype.exact}
|
|
|
|
{Exp.typ= sizeof_typ; nbytes; dynamic_length= None; subtype= Subtype.exact}
|
|
|
|
in
|
|
|
|
in
|
|
|
|
{empty_res_trans with exps= [(Exp.Sizeof sizeof_data, sizeof_typ)]}
|
|
|
|
{empty_res_trans with exps= [(Exp.Sizeof sizeof_data, sizeof_typ)]}
|
|
|
|
| k ->
|
|
|
|
| k ->
|
|
|
|
|
|
|
|
let typ = CType_decl.qual_type_to_sil_type tenv expr_info.Clang_ast_t.ei_qual_type in
|
|
|
|
L.(debug Capture Medium)
|
|
|
|
L.(debug Capture Medium)
|
|
|
|
"@\n\
|
|
|
|
"@\n\
|
|
|
|
WARNING: Missing translation of Uniry_Expression_Or_Trait of kind: %s . Expression \
|
|
|
|
WARNING: Missing translation of Uniry_Expression_Or_Trait of kind: %s . Expression \
|
|
|
|