[clang frontend] assert false on param mismatch

Reviewed By: dulmarod

Differential Revision: D4689474

fbshipit-source-id: 3f64f26
master
Andrzej Kotulski 8 years ago committed by Facebook Github Bot
parent 43f3a33c0c
commit 41c9b05b47

@ -892,10 +892,9 @@ struct
let params = List.tl_exn (collect_exprs result_trans_subexprs) in
if Int.equal (List.length params) (List.length params_stmt) then
params
else (Logging.err_debug
"WARNING: stmt_list and res_trans_par.exps must have same size. \
NEED TO BE FIXED\n\n";
fix_param_exps_mismatch params_stmt params) in
else
(Logging.out_debug "ERROR: stmt_list and res_trans_par.exps must have same size\n";
assert false) in
let act_params = if is_cf_retain_release then
(Exp.Const (Const.Cint IntLit.one), Typ.Tint Typ.IBool) :: act_params
else act_params in

@ -514,13 +514,6 @@ let define_condition_side_effects e_cond instrs_cond sil_loc =
[Sil.Load (id, Exp.Lvar pvar, typ, sil_loc)]
| _ -> [(e', typ)], instrs_cond
let fix_param_exps_mismatch params_stmt exps_param =
let diff = List.length params_stmt - List.length exps_param in
let args = if diff >0 then Array.create ~len:diff dummy_exp
else assert false in
let exps'= exps_param @ (Array.to_list args) in
exps'
let is_superinstance mei =
match mei.Clang_ast_t.omei_receiver_kind with
| `SuperInstance -> true

@ -62,8 +62,6 @@ val extract_item_from_singleton : 'a list -> string -> 'a -> 'a
val extract_exp_from_list : (Exp.t * Typ.t) list -> string -> (Exp.t * Typ.t)
val fix_param_exps_mismatch : 'a list -> (Exp.t * Typ.t) list -> (Exp.t * Typ.t)list
val get_selector_receiver : Clang_ast_t.obj_c_message_expr_info -> string * Clang_ast_t.receiver_kind
val define_condition_side_effects :

Loading…
Cancel
Save