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

Class GlobalDef

Import path

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

Direct supertypes

Indirect supertypes

Fields

Inherited fields

deffrom Def

Predicates

getIRFunction

Gets the IRFunction whose body is evaluated after this definition.

getIndirection

Gets the indirection level that this definition is writing to. For instance, x = y is a definition of x at indirection level 1 and *x = y is a definition of x at indirection level 2.

getIndirectionIndex

Gets the indirection index of this definition.

getLocation

Gets the location of this element.

getUnderlyingType

Gets the type of this definition, after typedefs have been resolved.

getUnspecifiedType

Gets the type of this definition after specifiers have been deeply stripped and typedefs have been resolved.

getVariable

Gets the global variable associated with this definition.

isCertain

Holds if this definition is guaranteed to overwrite the entire destination’s allocation.

toString

Gets a textual representation of this definition.

Inherited predicates

asDef

Gets the underlying non-phi definition or use.

from Def
asPhi

Gets the underlying phi node.

from SsaDef
getAddress

Gets the address written to by this definition.

from Def
getAddressOperand

Gets the address operand written to by this definition.

from Def
getAnUltimateDefinition

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

from Def
getSourceVariable

Gets the source variable underlying this SSA definition.

from Def
getValue

Gets the value written by this definition, if any.

from Def
hasIndexInBlock

Holds if this definition (or use) has index index in block block, and is a definition (or use) of the variable sv.

from Def

Charpred