coccinelle: api: check for macro context

A cast on a call to an allocation function that is the body of a macro can
be useful, as it ensures tha the macro is used for allocating objects of
the right type.  Add two new rules to ignore the macro case.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
This commit is contained in:
Julia Lawall 2026-08-02 21:20:51 +02:00
commit b64acacd54