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

Class LoopSplitting::LoopSplit

A split for loops where the body is guaranteed to be executed at least once, or guaranteed to never be executed. For example, in

void M(string[] args)
{
    if (args.Length == 0)
        return;
    foreach (var arg in args)
        System.Console.WriteLine(args);
}

the foreach loop is guaranteed to be executed at least once, as a result of the args.Length == 0 check.

Import path

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

Direct supertypes

Indirect supertypes

Fields

Predicates

toString

Gets a textual representation of this split.

Charpred