28.10.2012, 21:02, "John Regehr" <[email protected]>:
> Yes, definitely. The way we do this is using the param-to-local and
> param-to-global passes which try to turn arguments into local/global
> variables respectively. Then we rely on subsequent passes to clean up
> the resulting debris when possible. If these passes are missing cases
> please let us know.
I've got the next function in the output of creduce:
int A::create (const int &p1, const int &p2)
{
A ();
}
It's possible to remove p1 and p2 without loss of interestingness, however
creduce leaves them.
When applying param-to-global I get the next code:
const int & create_p1;
int A::create ( const int &p2)
{
A ();
}
It cannot be compiled because of non-initialized reference. What is the proper
way to fix it: get rid of references in separate pass, or add special case for
references in param-to-global and param-to-local?
--
Regards,
Konstantin