diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Completion.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Completion.qll index b1afbaed8ef..ab8bb233e2c 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Completion.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Completion.qll @@ -390,11 +390,6 @@ private predicate invalidCastCandidate(CastExpr ce) { ce.getExpr().getType() = getACastExprBaseType(ce) } -private predicate assertion(Assertion a, int i, AssertMethod am, Expr e) { - e = a.getExpr(i) and - am = a.getAssertMethod() -} - /** Gets a valid completion when argument `i` fails in assertion `a`. */ Completion assertionCompletion(Assertion a, int i) { exists(AssertMethod am | am = a.getAssertMethod() | @@ -429,11 +424,6 @@ private predicate inBooleanContext(Expr e) { or e = any(SpecificCatchClause scc).getFilterClause() or - exists(BooleanAssertMethod m, int i | - assertion(_, i, m, e) and - i = m.getAnAssertionIndex(_) - ) - or e = any(LogicalNotExpr lne | inBooleanContext(lne)).getAnOperand() or exists(LogicalAndExpr lae | @@ -481,11 +471,6 @@ private predicate inNullnessContext(Expr e) { or exists(QualifiableExpr qe | qe.isConditional() | e = qe.getChildExpr(-1)) or - exists(NullnessAssertMethod m, int i | - assertion(_, i, m, e) and - i = m.getAnAssertionIndex(_) - ) - or exists(ConditionalExpr ce | inNullnessContext(ce) | (e = ce.getThen() or e = ce.getElse())) or exists(NullCoalescingExpr nce | inNullnessContext(nce) | e = nce.getRightOperand())