@@ -390,11 +390,6 @@ private predicate invalidCastCandidate(CastExpr ce) {
390390 ce .getExpr ( ) .getType ( ) = getACastExprBaseType ( ce )
391391}
392392
393- private predicate assertion ( Assertion a , int i , AssertMethod am , Expr e ) {
394- e = a .getExpr ( i ) and
395- am = a .getAssertMethod ( )
396- }
397-
398393/** Gets a valid completion when argument `i` fails in assertion `a`. */
399394Completion assertionCompletion ( Assertion a , int i ) {
400395 exists ( AssertMethod am | am = a .getAssertMethod ( ) |
@@ -429,11 +424,6 @@ private predicate inBooleanContext(Expr e) {
429424 or
430425 e = any ( SpecificCatchClause scc ) .getFilterClause ( )
431426 or
432- exists ( BooleanAssertMethod m , int i |
433- assertion ( _, i , m , e ) and
434- i = m .getAnAssertionIndex ( _)
435- )
436- or
437427 e = any ( LogicalNotExpr lne | inBooleanContext ( lne ) ) .getAnOperand ( )
438428 or
439429 exists ( LogicalAndExpr lae |
@@ -481,11 +471,6 @@ private predicate inNullnessContext(Expr e) {
481471 or
482472 exists ( QualifiableExpr qe | qe .isConditional ( ) | e = qe .getChildExpr ( - 1 ) )
483473 or
484- exists ( NullnessAssertMethod m , int i |
485- assertion ( _, i , m , e ) and
486- i = m .getAnAssertionIndex ( _)
487- )
488- or
489474 exists ( ConditionalExpr ce | inNullnessContext ( ce ) | ( e = ce .getThen ( ) or e = ce .getElse ( ) ) )
490475 or
491476 exists ( NullCoalescingExpr nce | inNullnessContext ( nce ) | e = nce .getRightOperand ( ) )
0 commit comments