We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 245b727 commit f305a38Copy full SHA for f305a38
csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll
@@ -287,6 +287,18 @@ private module LogicInput implements GuardsImpl::LogicInputSig {
287
g2 = g1.(NullCoalescingExpr).getAnOperand() and
288
v1.isNullValue() and
289
v2 = v1
290
+ or
291
+ exists(Assertion assert, AssertMethod target, int i |
292
+ assert.getAssertMethod() = target and
293
+ g1 = assert and
294
+ v1.getDualValue().isThrowsException() and
295
+ g2 = assert.getExpr(i)
296
+ |
297
+ target.(BooleanAssertMethod).getAnAssertionIndex(v2.asBooleanValue()) = i
298
299
+ target.(NullnessAssertMethod).getAnAssertionIndex(any(boolean isNull | v2.isNullness(isNull))) =
300
+ i
301
+ )
302
}
303
304
0 commit comments