/// This tests that position variables in #defines are put in the right places. /// // Confidence: Moderate virtual patch virtual context virtual org virtual report @r1 depends on patch && !context && !org && !report@ identifier round_up,x,y; @@ -#define round_up(x,y) roundup(x,y) @r2 depends on patch && !context && !org && !report@ identifier name; @@ -#define name 4 // ---------------------------------------------------------------------------- @r1_context depends on !patch && (context || org || report)@ identifier round_up, x, y; position j0; @@ * #define round_up(x,y)@j0 roundup(x,y) @r2_context depends on !patch && (context || org || report)@ identifier name; position j0; @@ * #define name@j0 4 // ---------------------------------------------------------------------------- @script:python r1_org depends on org@ j0 << r1_context.j0; @@ msg = "found a match around here ..." coccilib.org.print_todo(j0[0], msg) @script:python r2_org depends on org@ j0 << r2_context.j0; @@ msg = "found a match around here ..." coccilib.org.print_todo(j0[0], msg) // ---------------------------------------------------------------------------- @script:python r1_report depends on report@ j0 << r1_context.j0; @@ msg = "found a match around here ..." coccilib.report.print_report(j0[0], msg) @script:python r2_report depends on report@ j0 << r2_context.j0; @@ msg = "found a match around here ..." coccilib.report.print_report(j0[0], msg)