/// Meta operators /// // Confidence: Moderate virtual patch virtual context virtual org virtual report @plusminus depends on patch && !context && !org && !report@ expression e1, e2; binary operator op1 = { -, *, /, %, |, &, ^, <<, >>, &&, ||, ==, !=, >, >=, <, <= } ; @@ - e1 op1 e2 + e1 + e2 @assign depends on patch && !context && !org && !report@ expression e1, e2; assignment operator aop1 = { +=, -=, *=, /=, %=, |=, &=, ^=, <<=, >>= }; assignment operator aop2 = = ; @@ ( - e1 aop1 e2 + e1 = e2 | - e1 aop2 e2 + e1 += e2 ) // ---------------------------------------------------------------------------- @plusminus_context depends on !patch && (context || org || report)@ expression e1, e2; binary operator op1 = {-,*,/,%,|,&,^,<<,>>,&&,||,==,!=,>,>=,<,<=}; position j0; @@ * e1@j0 op1 e2 @assign_context depends on !patch && (context || org || report)@ assignment operator aop1 = {+=,-=,*=,/=,%=,|=,&=,^=,<<=,>>=}, aop2 = =; expression e1, e2; position j0; @@ ( * e1@j0 aop1 e2 | * e1@j0 aop2 e2 ) // ---------------------------------------------------------------------------- @script:python plusminus_org depends on org@ j0 << plusminus_context.j0; @@ msg = "Binary operator." coccilib.org.print_todo(j0[0], msg) @script:python assign_org depends on org@ j0 << assign_context.j0; @@ msg = "Assignment operator." coccilib.org.print_todo(j0[0], msg) // ---------------------------------------------------------------------------- @script:python plusminus_report depends on report@ j0 << plusminus_context.j0; @@ msg = "Binary operator." coccilib.report.print_report(j0[0], msg) @script:python assign_report depends on report@ j0 << assign_context.j0; @@ msg = "Assignment operator." coccilib.report.print_report(j0[0], msg)