CodeQL library for C/C++
Search

Class GuardedSsa

An SsaDefinition with an additional predicate isLt.

Import path

import semmle.code.cpp.controlflow.Guards

Direct supertypes

Indirect supertypes

Predicates

isLt

Holds if this SsaDefinition is guarded such that this(var) < gt + k is testIsTrue in block.

Inherited predicates

definedByParameter

Holds if the SSA variable (this, p) is defined by parameter p.

from SsaDefinition
getAPhiInput

Holds if the SSA variable (result, v) is an input to the phi definition (this, v).

from SsaDefinition
getAPrimaryQlClass

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

from ElementBase
getAUse

Gets a use of the SSA variable represented by the pair (this, v).

from SsaDefinition
getAVariable

Gets a variable corresponding to an SSA StackVariable defined by this definition.

from SsaDefinition
getAnUltimateDefiningValue

Gets a possible defining expression for v at this SSA definition, recursing backwards through phi definitions. Not all definitions have a defining expression—see the documentation for getDefiningValue.

from SsaDefinition
getAnUltimateDefinition

DEPRECATED: this is the old name for getAnUltimateDefiningValue. The name was confusing as it seemed analogous to getDefinition rather than getDefiningValue. The SSA libraries for other languages use the name getAnUltimateSsaDefinition to refer to a predicate named getAnUltimateSsaDefinition in this class.

from SsaDefinition
getAnUltimateSsaDefinition

Gets a definition that ultimately defines this variable and is not itself a phi node.

from SsaDefinition
getBasicBlock

Gets the BasicBlock containing this definition.

from SsaDefinition
getCanonicalQLClass

DEPRECATED: use getAPrimaryQlClass instead.

from ElementBase
getDefiningValue

Gets the expression assigned to the SSA variable (this, v), if any, when it is not a phi definition. The following is an exhaustive list of expressions that may be the result of this predicate.

from SsaDefinition
getDefinition

Gets the control-flow node for this definition. This will usually be the control-flow node that assigns to this variable as a side effect, but there are some exceptions. If this is defined by initialization, the result is the value of Initializer.getExpr() for that initialization. If this is a function parameter (see definedByParameter), the result will be the function entry point. If this variable is defined by being passed as a reference in a function call, including overloaded operators, the result will be the VariableAccess expression for this parameter. If this is a phi node (see isPhiNode), the result will be the node where control flow is joined from multiple paths.

from SsaDefinition
getLocation

Gets the location of this definition.

from SsaDefinition
getPrimaryQlClasses

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

from ElementBase
isPhiNode

Holds if this definition is a phi node for variable v.

from SsaDefinition
reachesEndOfBB

Holds if (this, v) reaches the end of basic block b.

from SsaDefinition
toString

Gets a textual representation of this element.

from ElementBase
toString

Gets a string representation of the SSA variable represented by the pair (this, v).

from SsaDefinition