Add ConditionalExpr.getBranchExpr(boolean)

This commit is contained in:
Marcono1234
2021-02-12 03:56:29 +01:00
parent 02578cfff2
commit 905648e452
13 changed files with 35 additions and 65 deletions

View File

@@ -36,7 +36,7 @@ predicate usefulUpcast(CastExpr e) {
)
or
// Upcasts that are performed on an operand of a ternary expression.
exists(ConditionalExpr ce | e = ce.getTrueExpr() or e = ce.getFalseExpr())
exists(ConditionalExpr ce | e = ce.getBranchExpr(_))
or
// Upcasts to raw types.
e.getType() instanceof RawType