Skip to content
Snippets Groups Projects
Commit 8269bc74 authored by David Bühler's avatar David Bühler
Browse files

[Wp] Fixes a crash in the GUI.

parent 5e6d288d
No related branches found
No related tags found
No related merge requests found
......@@ -407,19 +407,23 @@ let model_varinfo :
| PLval(Some kf, _ , (Var x,NoOffset))
| PTermLval(Some kf, _, _, (TVar {lv_origin=Some x},TNoOffset))
when button=1 ->
let init = WpStrategy.is_main_init kf in
let acc = RefUsage.get ~kf ~init x in
let model = match acc with
| RefUsage.NoAccess -> "any"
| RefUsage.ByValue -> "'var'"
| RefUsage.ByRef -> "'ref'"
| RefUsage.ByArray when x.vformal && Cil.isPointerType x.vtype
-> "'caveat'"
| _ -> "'typed'"
in
main#pretty_information
"Is is accessed as %t and fits in %s wp-model@."
(RefUsage.print x acc) model ;
begin
try
let init = WpStrategy.is_main_init kf in
let acc = RefUsage.get ~kf ~init x in
let model = match acc with
| RefUsage.NoAccess -> "any"
| RefUsage.ByValue -> "'var'"
| RefUsage.ByRef -> "'ref'"
| RefUsage.ByArray when x.vformal && Cil.isPointerType x.vtype
-> "'caveat'"
| _ -> "'typed'"
in
main#pretty_information
"Is is accessed as %t and fits in %s wp-model@."
(RefUsage.print x acc) model ;
with _ -> ()
end
| _ -> ()
(* -------------------------------------------------------------------------- *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment