Java: Add ConditionalExpr to overflow candidate pattern.

This commit is contained in:
Anders Schack-Mulligen
2019-11-12 17:27:18 +01:00
parent 39a45ceefe
commit 8cd6b51763
2 changed files with 10 additions and 0 deletions

View File

@@ -132,6 +132,11 @@ Expr overFlowCand() {
result.(AssignExpr).getRhs() = overFlowCand()
or
result.(LocalVariableDeclExpr).getInit() = overFlowCand()
or
exists(ConditionalExpr c | c = result |
c.getTrueExpr() = overFlowCand() and
c.getFalseExpr() = overFlowCand()
)
}
predicate positiveOrNegative(Expr e) { positive(e) or negative(e) }