CodeQL library for C#
codeql/csharp-all 3.1.1 (changelog, source)
Search

Member predicate BooleanSplitting::BooleanSplitSubKind::correlatesConditions

Holds if the branch taken by condition cb1 should be recorded in this split, and the recorded value determines the branch taken by a later condition cb2, possibly inverted.

For example, in

var b = GetB();
if (b)
    Console.WriteLine("b is true");
if (!b)
    Console.WriteLine("b is false");

the branch taken in the condition on line 2 can be recorded, and the recorded value will determine the branch taken in the condition on line 4.

predicate correlatesConditions(ConditionBlock cb1, ConditionBlock cb2, boolean inverted)