CodeQL library for Python
Search

Class ComparisonControlBlock

A basic block which terminates in a condition, splitting the subsequent control flow, in which the condition is an instance of Comparison

Import path

import semmle.python.Comparisons

Direct supertypes

Indirect supertypes

Predicates

controls

Whether this conditional guard determines that, in block b, l == r + k if eq is true, or l != r + k if eq is false,

controls

Whether this conditional guard determines that, in block b, l == r + k if eq is true, or l != r + k if eq is false,

getTest
impliesThat

Whether this conditional guard implies that, in block b, the result of that is thatIsTrue

Inherited predicates

alwaysReaches

Holds if flow from this BasicBlock always reaches succ

from BasicBlock
contains

Whether this basic block contains the specified node

from BasicBlock
controls

Basic blocks controlled by this condition, i.e. those BBs for which the condition is testIsTrue

from ConditionBlock
controlsEdge

Holds if this condition controls the edge pred->succ, i.e. those edges for which the condition is testIsTrue.

from ConditionBlock
dominanceFrontier

Dominance frontier of a node x is the set of all nodes other such that this dominates a predecessor of other but does not strictly dominate other

from BasicBlock
dominates

Whether this basic block dominates the other

from BasicBlock
getAFalseSuccessor

Gets a false successor to this basic block

from BasicBlock
getAPredecessor

Gets a predecessor to this basic block

from BasicBlock
getASuccessor

Gets a successor to this basic block

from BasicBlock
getATrueSuccessor

Gets a true successor to this basic block

from BasicBlock
getAnExceptionalSuccessor

Gets an exceptional successor to this basic block

from BasicBlock
getAnUnconditionalSuccessor

Gets an unconditional successor to this basic block

from BasicBlock
getImmediateDominatorfrom BasicBlock
getImmediatelyControllingBlock

Gets the ConditionBlock, if any, that controls this block and does not control any other ConditionBlocks that control this block. That is the ConditionBlock that is closest dominator.

from BasicBlock
getLastNode

Gets the last node in this basic block

from BasicBlock
getNode

Gets the nth node in this basic block

from BasicBlock
getScope

Gets the scope of this block

from BasicBlock
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from BasicBlock
likelyReachable

Whether (as inferred by type inference) this basic block is likely to be reachable.

from BasicBlock
reaches

Holds if this basic block reaches the other. Is the start of other reachable from the end of this.

from BasicBlock
reachesExit

Whether flow from this basic block reaches a normal exit from its scope

from BasicBlock
strictlyDominates

Whether this basic block strictly dominates the other

from BasicBlock
strictlyReaches

Holds if this basic block strictly reaches the other. Is the start of other reachable from the end of this.

from BasicBlock
toString

Gets a textual representation of this element.

from BasicBlock
unlikelySuccessor

Whether (as inferred by type inference) it is highly unlikely (or impossible) for control to flow from this to succ.

from BasicBlock

Charpred