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

Class GlobalDefImpl

A definition that models a synthetic “initial definition” of a global variable just after the function entry point.

See the QLDoc for GlobalUse for how this is used.

Import path

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

Direct supertypes

Indirect supertypes

Fields

Predicates

getBase

Gets the instruction that computes the base of this definition or use. This is always a VariableAddressInstruction or an CallInstruction.

getIRFunction

Gets the IRFunction whose body is evaluated after this definition.

getIndirection
getIndirectionIndex

Gets the global variable associated with this definition.

getLocation

Gets the location of this element.

getSourceVariable

Gets the global variable associated with this definition.

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.

hasIndexInBlock

Holds if this definition or use has index index in block block.

toString

Gets a textual representation of this element.

Inherited predicates

getBaseSourceVariable

Gets the base source variable (i.e., the variable without any indirection) of this definition or use.

from DefOrUseImpl
getBlock

Gets the block of this definition or use.

from DefOrUseImpl
hasIndexInBlock

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

from DefOrUseImpl

Charpred