On Mon, 2018-06-11 at 23:23 +0200, Julia Lawall wrote: > On Mon, 11 Jun 2018, Joe Perches wrote: > > Many times it would be useful to update functions > > where non-const arguments are used only as const > > dereferences or as arguments to other function that > > use const. > > > > Is it possible for coccinelle to find and show > > these types of uses that could be const? > > Yes, it's possible. It's a bit complex because the use is often inter > procedural. I made a semantic patch for it, but I didn't invest a lot of > time in it because I wasn't sure if it would be considered to be useful, > or just useless churn.
I believe such a patch would not be useless as it allows conversion of structures and arrays that are currently placed into r/w memory (data) to be moved to const (text). _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
