From 7e9f859896b69b4d2843f317f8ff283af0a9bb4f Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 19 Jun 2017 02:04:41 -0700 Subject: [PATCH] More detailed error message for typ_get_recursive_flds Reviewed By: akotulski Differential Revision: D5265620 fbshipit-source-id: 10f8e3b --- infer/src/backend/abs.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/infer/src/backend/abs.ml b/infer/src/backend/abs.ml index 67ceec63f..b89764022 100644 --- a/infer/src/backend/abs.ml +++ b/infer/src/backend/abs.ml @@ -428,8 +428,10 @@ let typ_get_recursive_flds tenv typ_exp = match Tenv.lookup tenv name with | Some { fields } -> List.map ~f:fst3 (List.filter ~f:(filter typ) fields) | None -> - L.(debug Analysis Quiet) "@\ntyp_get_recursive: unexpected type expr: %a@." - Exp.pp typ_exp; + L.(debug Analysis Quiet) + "@\ntyp_get_recursive_flds: unexpected %a unknown struct type: %a@." + Exp.pp typ_exp + Typ.Name.pp name; [] (* ToDo: assert false *) ) | 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.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 let discover_para_roots tenv p root1 next1 root2 next2 : Sil.hpara option =