CodeQL library for C/C++
codeql/cpp-all 0.13.1 (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

Inherited fields

Predicates

getBaseSourceVariable

Gets the global variable associated with this definition.

getIRFunction

Gets the IRFunction whose body is evaluated after this definition.

getIndirection

Gets the index (i.e., the number of loads required) of this definition or use.

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.

getValue
getVariable

Gets the global variable associated with this definition.

hasIndexInBlock

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

isCertain
toString

Gets a textual representation of this element.

Inherited predicates

getAddressOperandfrom DefImpl
getBlock

Gets the block of this definition or use.

from DefImpl
getIndirectionIndex

Gets the indirection index of this definition.

from DefImpl
getSourceVariable

Gets the variable that is defined or used.

from DefImpl
hasIndexInBlock

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

from DefImpl

Charpred