Skip to content
Snippets Groups Projects
Commit 3e2b3f9d authored by Virgile Prevosto's avatar Virgile Prevosto Committed by David Bühler
Browse files

[kernel] ast diff look for a kf only if varinfo has function type

parent 77bbf548
No related branches found
No related tags found
No related merge requests found
...@@ -1322,7 +1322,7 @@ and enumitem_correspondance ?loc:_loc ei _env = Enumitem.find ei ...@@ -1322,7 +1322,7 @@ and enumitem_correspondance ?loc:_loc ei _env = Enumitem.find ei
and gvar_correspondance ?loc vi env = and gvar_correspondance ?loc vi env =
let add vi = let add vi =
match find_candidate_varinfo ?loc vi Cil_types.VGlobal with match find_candidate_varinfo ?loc vi Cil_types.VGlobal with
| None -> | None when Cil.isFunctionType vi.vtype ->
begin begin
match gfun_correspondance ?loc vi env with match gfun_correspondance ?loc vi env with
| `Same kf' -> `Same (Kf.get_vi kf') | `Same kf' -> `Same (Kf.get_vi kf')
...@@ -1332,6 +1332,7 @@ and gvar_correspondance ?loc vi env = ...@@ -1332,6 +1332,7 @@ and gvar_correspondance ?loc vi env =
`Same (Kf.get_vi kf') `Same (Kf.get_vi kf')
| `Not_present -> `Not_present | `Not_present -> `Not_present
end end
| None -> `Not_present
| Some vi' -> | Some vi' ->
let selection = State_selection.singleton Globals.Vars.self in let selection = State_selection.singleton Globals.Vars.self in
let init = let init =
......
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