Hello all,
I'm wanting to replace a struct member with a function call across the
code base I'm working on.
For example, I currently have the following struct definition (simplified):
struct monitor {
struct {
int width;
int height
} virtual;
};
Across my code base, I typically have the following:
struct monitor *m;
int f = m->virtual.width;
I have a need to remove `m->virtual.width` with a function call, hence
the example above after the modified code would look something like:
struct monitor *m;
int f = get_monitor_width();
I've tried the following smPL code without any success. Could someone
point me in the right direction? TIA!
@@
type M;
@@
- m->virtual.width;
+ get_monitor_width();
-- Thomas
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci