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

Member predicate ControlFlow::Node::postDominates

Holds if this node post-dominates that node.

That is, all paths reaching a normal callable exit node (an AnnotatedExitNode with a normal exit type) from that node must go through this node.

Example:

int M(string s)
{
    try
    {
        return s.Length;
    }
    finally
    {
        Console.WriteLine("M");
    }
}

The node on line 9 post-dominates the node on line 5 (all paths to the exit point of M from return s.Length; must go through the WriteLine call).

This predicate is reflexive, so for example Console.WriteLine("M"); post-dominates itself.

predicate postDominates(Node that)