On Mon, 27 Feb 2012, ron minnich wrote:

@@
local idexpression struct drm_device *n;
identifier func;
identifier dev;
expression p;
@@
-func(n)
+func(void)


Which I'd like to match:

void intel_setup_bios(struct drm_device *dev)

but I get nothing. I also tried
-func(struct drm_device *dev)
where dev is defined as an identifier but ... no good. What am I missing?

I have the impression that you figured it out, but just for clarity, you have to always match a complete term. In your case it was looking for a function call, but you wanted to match a complete definition. Similarly, if you want to match an if header, you have to match the whole if. It does some optimizations to minimize the time spent on th uninteresting parts.

julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to