Class BasicBlocks::BasicBlock

A basic block in the C/C++ control-flow graph.

A basic block is a simple sequence of control-flow nodes, connected to each other and nothing else:

   A - B - C - D  ABCD is a basic block

Any incoming or outgoing edges break the block into two:

   A - B > C - D  AB is a basic block and CD is a basic block (C has two incoming edges)


   A - B < C - D  AB is a basic block and CD is a basic block (B has two outgoing edges)

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

contains
getAFalseSuccessor
getANode
getAPredecessor
getASuccessor
getATrueSuccessor
getEnclosingFunction
getEnd
getNode
getStart
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 LGTM locations.

inLoop

Holds if this basic block is in a loop of the control-flow graph. This includes loops created by goto statements. This predicate may not hold even if this basic block is syntactically inside a while loop if the necessary back edges are unreachable.

isLoopHeader

DEPRECATED since version 1.11: this predicate does not match the standard definition of loop header.

isReachable

Holds if control flow may reach this basic block from a function entry point or any handler of a reachable try statement.

isUnreachable

Means not isReachable().

length

Gets the number of ControlFlowNodes in this basic block.

Inherited predicates

toString

Gets a textual representation of this element.

from ElementBase

Charpred