Class Node

A node in a data flow graph.

A node can be either an expression, a parameter, or an uninitialized local variable. Such nodes are created with DataFlow::exprNode, DataFlow::parameterNode, and DataFlow::uninitializedNode respectively.

Import path

import semmle.code.cpp.ir.dataflow.internal.DataFlowUtil

Direct supertypes

Known direct subtypes

Predicates

asConvertedExpr

Gets the expression corresponding to this node, if any. The returned expression may be a Conversion.

asDefiningArgument

Gets the argument that defines this DefinitionByReferenceNode, if any.

asExpr

Gets the non-conversion expression corresponding to this node, if any. If this node strictly (in the sense of asConvertedExpr) corresponds to a Conversion, then the result is that Conversion’s non-Conversion base expression.

asInstruction

Gets the instruction corresponding to this node, if any.

asParameter

Gets the parameter corresponding to this node, if any.

asUninitialized

DEPRECATED: See UninitializedNode.

asVariable

Gets the variable corresponding to this node, if any. This can be used for modelling flow in and out of global variables.

getEnclosingCallable

INTERNAL: Do not use.

getFunction

Gets the function to which this node belongs, if any.

getLocation

Gets the location of this element.

getType

Gets the type of this node.

getTypeBound

Gets an upper bound on the type of this node.

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.

toString

Gets a textual representation of this element.