More detailed error message for typ_get_recursive_flds

Reviewed By: akotulski

Differential Revision: D5265620

fbshipit-source-id: 10f8e3b
master
Mehdi Bouaziz 8 years ago committed by Facebook Github Bot
parent aad66bc6f6
commit 7e9f859896

@ -428,8 +428,10 @@ let typ_get_recursive_flds tenv typ_exp =
match Tenv.lookup tenv name with match Tenv.lookup tenv name with
| Some { fields } -> List.map ~f:fst3 (List.filter ~f:(filter typ) fields) | Some { fields } -> List.map ~f:fst3 (List.filter ~f:(filter typ) fields)
| None -> | None ->
L.(debug Analysis Quiet) "@\ntyp_get_recursive: unexpected type expr: %a@." L.(debug Analysis Quiet)
Exp.pp typ_exp; "@\ntyp_get_recursive_flds: unexpected %a unknown struct type: %a@."
Exp.pp typ_exp
Typ.Name.pp name;
[] (* ToDo: assert false *) [] (* ToDo: assert false *)
) )
| Tint _ | Tvoid | Tfun _ | Tptr _ | Tfloat _ | Tarray _ | TVar _ -> [] | Tint _ | Tvoid | Tfun _ | Tptr _ | Tfloat _ | Tarray _ | TVar _ -> []
@ -437,7 +439,7 @@ let typ_get_recursive_flds tenv typ_exp =
| Exp.Var _ -> [] (* type of |-> not known yet *) | Exp.Var _ -> [] (* type of |-> not known yet *)
| Exp.Const _ -> [] | Exp.Const _ -> []
| _ -> | _ ->
L.internal_error "@\ntyp_get_recursive: unexpected type expr: %a@." Exp.pp typ_exp; L.internal_error "@\ntyp_get_recursive_flds: unexpected type expr: %a@." Exp.pp typ_exp;
assert false assert false
let discover_para_roots tenv p root1 next1 root2 next2 : Sil.hpara option = let discover_para_roots tenv p root1 next1 root2 next2 : Sil.hpara option =

Loading…
Cancel
Save