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

Class BooleanSplitting::SsaBooleanSplitSubKind

A Boolean split that records the value of a Boolean SSA variable.

For example, in

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

there is a Boolean split on the SSA variable for b at line 1.

Import path

import semmle.code.csharp.controlflow.internal.Splitting

Direct supertypes

Indirect supertypes

Predicates

canReachCorrelatedCondition

Holds if basic block bb can reach a condition correlated with a split of this kind.

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.

getEnclosingCallable

Gets the callable that this Boolean split kind belongs to.

getLocation

Gets the location of this Boolean split kind.

toString

Gets a textual representation of this Boolean split kind.

Inherited predicates

startsSplit

Holds if control flow element cfe starts a split of this kind.

from BooleanSplitSubKind

Charpred