mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
15 lines
399 B
Plaintext
15 lines
399 B
Plaintext
import java
|
|
|
|
from BinaryExpr be, string reason
|
|
where
|
|
not exists(be.getLeftOperand()) and reason = "No left operand"
|
|
or
|
|
not exists(be.getRightOperand()) and reason = "No right operand"
|
|
or
|
|
exists(Expr e, int i |
|
|
e.isNthChildOf(be, i) and i != 0 and i != 1 and reason = "Unexpected operand " + i.toString()
|
|
)
|
|
or
|
|
be.getOp() = " ?? " and reason = "No operator name"
|
|
select be, reason
|