let replacement_visitor replace_pre fa_terms ret_opt = object
inherit nopCilVisitor
method vterm_node t =
match t with
| TConst _ | TSizeOf _ | TSizeOfStr _
| TAlignOf _ | Tnull | Ttype _ | Tempty_set -> SkipChildren
| TLval tlval -> treat_tlval fa_terms ret_opt LvalOrig tlval
| TAddrOf tlval -> treat_tlval fa_terms ret_opt AddrOfOrig tlval
| TStartOf _
| _ -> DoChildren
method vlogic_label l =
match l with
| StmtLabel _ -> DoChildren
| LogicLabel _
when Cil_datatype.Logic_label.equal l Logic_const.pre_label ->
ChangeDoChildrenPost(replace_pre, fun x->x)
| LogicLabel _ -> DoChildren
end