target/mips: Simplify decode_opc_mxu() ifdef'ry
[qemu/ar7.git] / scripts / coccinelle / qom-parent-type.cocci
blob9afb3edd97fb447d10fd79be8766c3745f40fe04
1 // Highlight object declarations that don't look like object class but
2 // accidentally inherit from it.
4 @match@
5 identifier obj_t, fld;
6 type parent_t =~ ".*Class$";
7 @@
8 struct obj_t {
9     parent_t fld;
10     ...
13 @script:python filter depends on match@
14 obj_t << match.obj_t;
16 is_class_obj = obj_t.endswith('Class')
17 cocci.include_match(not is_class_obj)
19 @replacement depends on filter@
20 identifier match.obj_t, match.fld;
21 type match.parent_t;
23 struct obj_t {
24 *   parent_t fld;
25     ...