class BlockDataRegion

Declaration

class BlockDataRegion : public TypedRegion { /* full declaration omitted */ };

Description

BlockDataRegion - A region that represents a block instance. Blocks are represented with two kinds of regions. BlockCodeRegions represent the "code", while BlockDataRegions represent instances of blocks, which correspond to "code+data". The distinction is important, because like a closure a block captures the values of externally referenced variables.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:674

Inherits from: TypedRegion

Member Variables

private const clang::ento::BlockCodeRegion* BC
private const clang::LocationContext* LC
private unsigned int BlockCount
private void* ReferencedVars = nullptr
private void* OriginalVars = nullptr

Inherited from SubRegion:

protected superRegion

Method Overview

  • private BlockDataRegion(const clang::ento::BlockCodeRegion * bc, const clang::LocationContext * lc, unsigned int count, const clang::ento::MemSpaceRegion * sreg)
  • private void LazyInitializeReferencedVars()
  • public void Profile(llvm::FoldingSetNodeID & ID) const
  • private static void ProfileRegion(llvm::FoldingSetNodeID &, const clang::ento::BlockCodeRegion *, const clang::LocationContext *, unsigned int, const clang::ento::MemRegion *)
  • public static bool classof(const clang::ento::MemRegion * R)
  • public void dumpToStream(llvm::raw_ostream & os) const
  • private std::pair<const VarRegion *, const VarRegion *> getCaptureRegions(const clang::VarDecl * VD)
  • public const clang::ento::BlockCodeRegion * getCodeRegion() const
  • public const clang::BlockDecl * getDecl() const
  • public clang::QualType getLocationType() const
  • public const clang::ento::VarRegion * getOriginalRegion(const clang::ento::VarRegion * VR) const
  • public clang::ento::BlockDataRegion::referenced_vars_iterator referenced_vars_begin() const
  • public clang::ento::BlockDataRegion::referenced_vars_iterator referenced_vars_end() const

Inherited from TypedRegion:

Inherited from SubRegion:

Inherited from MemRegion:

Inherited from FoldingSetBase::Node:

Methods

BlockDataRegion(
    const clang::ento::BlockCodeRegion* bc,
    const clang::LocationContext* lc,
    unsigned int count,
    const clang::ento::MemSpaceRegion* sreg)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:683

Parameters

const clang::ento::BlockCodeRegion* bc
const clang::LocationContext* lc
unsigned int count
const clang::ento::MemSpaceRegion* sreg

void LazyInitializeReferencedVars()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:760

void Profile(llvm::FoldingSetNodeID& ID) const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:753

Parameters

llvm::FoldingSetNodeID& ID

static void ProfileRegion(
    llvm::FoldingSetNodeID&,
    const clang::ento::BlockCodeRegion*,
    const clang::LocationContext*,
    unsigned int,
    const clang::ento::MemRegion*)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:695

Parameters

llvm::FoldingSetNodeID&
const clang::ento::BlockCodeRegion*
const clang::LocationContext*
unsigned int
const clang::ento::MemRegion*

static bool classof(
    const clang::ento::MemRegion* R)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:755

Parameters

const clang::ento::MemRegion* R

void dumpToStream(llvm::raw_ostream& os) const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:751

Parameters

llvm::raw_ostream& os

std::pair<const VarRegion*, const VarRegion*>
getCaptureRegions(const clang::VarDecl* VD)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:762

Parameters

const clang::VarDecl* VD

const clang::ento::BlockCodeRegion*
getCodeRegion() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:701

const clang::BlockDecl* getDecl() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:704

clang::QualType getLocationType() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:706

const clang::ento::VarRegion* getOriginalRegion(
    const clang::ento::VarRegion* VR) const

Description

Return the original region for a captured region, if one exists. It might return null.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:746

Parameters

const clang::ento::VarRegion* VR

clang::ento::BlockDataRegion::
    referenced_vars_iterator
    referenced_vars_begin() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:748

clang::ento::BlockDataRegion::
    referenced_vars_iterator
    referenced_vars_end() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:749