clang  14.0.0git
Public Types | Public Attributes | List of all members
clang::ento::bugreporter::StoreInfo Struct Reference

Describes an event when the value got stored into a memory region. More...

#include "clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h"

Collaboration diagram for clang::ento::bugreporter::StoreInfo:
Collaboration graph
[legend]

Public Types

enum  Kind { Initialization, Assignment, CallArgument, BlockCapture }
 

Public Attributes

Kind StoreKind
 The type of store operation. More...
 
const ExplodedNodeStoreSite
 The node where the store happened. More...
 
const ExprSourceOfTheValue
 The expression where the value comes from. More...
 
SVal Value
 Symbolic value that is being stored. More...
 
const MemRegionDest
 Memory regions involved in the store operation. More...
 
const MemRegionOrigin
 

Detailed Description

Describes an event when the value got stored into a memory region.

As opposed to checker checkBind API, it reacts also to binds generated by the checker as well. It can be useful when the binding happened as a result of evalCall, for example.

Definition at line 120 of file BugReporterVisitors.h.

Member Enumeration Documentation

◆ Kind

Enumerator
Initialization 

The value got stored into the region during initialization: int x = 42;.

Assignment 

The value got stored into the region during assignment: int x; x = 42;.

CallArgument 

The value got stored into the parameter region as the result of a call.

BlockCapture 

The value got stored into the region as block capture.

Block data is modeled as a separate region, thus whenever the analyzer sees a captured variable, its value is copied into a special block region.

Definition at line 121 of file BugReporterVisitors.h.

Member Data Documentation

◆ Dest

const MemRegion* clang::ento::bugreporter::StoreInfo::Dest

Memory regions involved in the store operation.

Dest <- Origin NOTE: Origin might be null, when the stored value doesn't come from another region.

Definition at line 152 of file BugReporterVisitors.h.

◆ Origin

const MemRegion * clang::ento::bugreporter::StoreInfo::Origin

Definition at line 152 of file BugReporterVisitors.h.

◆ SourceOfTheValue

const Expr* clang::ento::bugreporter::StoreInfo::SourceOfTheValue

The expression where the value comes from.

NOTE: might be null.

Definition at line 145 of file BugReporterVisitors.h.

Referenced by clang::ento::bugreporter::StoreHandler::constructNote().

◆ StoreKind

Kind clang::ento::bugreporter::StoreInfo::StoreKind

The type of store operation.

Definition at line 140 of file BugReporterVisitors.h.

◆ StoreSite

const ExplodedNode* clang::ento::bugreporter::StoreInfo::StoreSite

The node where the store happened.

Definition at line 142 of file BugReporterVisitors.h.

Referenced by clang::ento::bugreporter::StoreHandler::constructNote().

◆ Value

SVal clang::ento::bugreporter::StoreInfo::Value

Symbolic value that is being stored.

Definition at line 147 of file BugReporterVisitors.h.


The documentation for this struct was generated from the following file: