1 // problem with positions. in check_unprotected, we start with a set of
2 // positions, but the binding that is deduced is only relevant to one of them
3 // but since it was deduced from both of them, both of them are printed out
17 if (x == NULL) { ... return ...; } else S
22 @check_unprotected exists@ // ensure both are present
23 position unprotected.p, unprotected.p1;
32 @ script:python depends on check_unprotected @
33 p << unprotected.p; // position of ref
34 p1 << unprotected.p1; // position of call
35 fld << check_unprotected.fld; // identifier
38 c = cocci.combine(fld,p1)
39 print " call to FN on line %s column %s" % (c.location.line,c.location.column)
40 c1 = cocci.combine(fld,p)
41 print " ref to field %s on line %s column %s" % (fld,c1.location.line,c1.location.column)