CodeQL library for C/C++
codeql/cpp-all 0.12.9 (changelog, source)
Search

Class SubBasicBlock

A block that can be smaller than or equal to a BasicBlock. Use this class when ControlFlowNode is too fine-grained and BasicBlock too coarse-grained. Their successor graph is like that of basic blocks, except that the blocks are split up with an extra edge right before any instance of the abstract class SubBasicBlockCutNode. Users of this library must therefore extend SubBasicBlockCutNode to direct where basic blocks will be split up.

Import path

import semmle.code.cpp.controlflow.SubBasicBlocks

Direct supertypes

Indirect supertypes

Predicates

contains

Holds if this contains node.

firstInBB

Holds if this SubBasicBlock comes first in its basic block. This is the only condition under which a SubBasicBlock may have multiple predecessors.

getAFalseSuccessor

Gets a node such that the control-flow edge (this, result) may be taken when the final node of this SubBasicBlock is a conditional expression and evaluates to false.

getANode

Gets a control-flow node in this SubBasicBlock.

getAPredecessor

Gets a predecessor in the control-flow graph of SubBasicBlocks.

getASuccessor

Gets a successor in the control-flow graph of SubBasicBlocks.

getATrueSuccessor

Gets a node such that the control-flow edge (this, result) may be taken when the final node of this SubBasicBlock is a conditional expression and evaluates to true.

getBasicBlock

Gets the basic block in which this SubBasicBlock is contained.

getEnclosingFunction

Gets the function that contains this SubBasicBlock.

getEnd

Gets the last control-flow node in this SubBasicBlock.

getNode

Gets the indexth control-flow node in this SubBasicBlock. Indexes start from 0, and the node at index 0 always exists and compares equal to this.

getNumberOfNodes

Gets the number of control-flow nodes in this SubBasicBlock. There is always at least one.

getRankInBasicBlock

Gets the (1-based) rank of this SubBasicBlock among the other SubBasicBlocks in its containing basic block bb, where bb is equal to getBasicBlock().

getStart

Gets the first control-flow node in this SubBasicBlock.

lastInBB

Holds if this SubBasicBlock comes last in its basic block. This is the only condition under which a SubBasicBlock may have multiple successors.

Inherited predicates

getAPrimaryQlClass

Gets the name of a primary CodeQL class to which this element belongs.

from ElementBase
getPrimaryQlClasses

Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs.

from ElementBase
toString

Gets a textual representation of this element.

from ElementBase

Charpred