Module BufferOverrunUtils.ReplaceCallee
type replaced
=
{
pname : IR.Procname.t;
args : (IR.Exp.t * IR.Typ.t) list;
is_args_ref : bool;
}
Replaced proc name with its modified parameters.
is_args_ref
represents that the arguments are given as references to variables, e.g., whenint i = 5;
, the function ofstd::make_shared<C>(i);
in C++ is translated tostd::make_shared<C>(&i, tgt)
in Sil wheretgt
is the variable for the target object, rather thanstd::make_shared<C>(i, tgt)
(note that the type of&i
isint&
).The
is_args_ref
value is used to evaluate argments correctly after replacing the callee. For example, when we replacestd::make_shared<C>(&i, tgt)
to the constructor call ofC
, i.e.C(tgt, i)
, the arguments' order and types are slightly different, so which should be handled correctly later in the instantiation phase.