clang 20.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"

Public Types

enum  Kind { Initialization , Assignment , CallArgument , BlockCapture }
 

Public Attributes

Kind StoreKind
 The type of store operation.
 
const ExplodedNodeStoreSite
 The node where the store happened.
 
const ExprSourceOfTheValue
 The expression where the value comes from.
 
SVal Value
 Symbolic value that is being stored.
 
const MemRegionDest
 Memory regions involved in the store operation.
 
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 127 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 128 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 159 of file BugReporterVisitors.h.

Referenced by showBRDefaultDiagnostics(), showBRDiagnostics(), and showBRParamDiagnostics().

◆ Origin

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

◆ SourceOfTheValue

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

The expression where the value comes from.

NOTE: might be null.

Definition at line 152 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 147 of file BugReporterVisitors.h.

Referenced by showBRDiagnostics().

◆ StoreSite

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

The node where the store happened.

Definition at line 149 of file BugReporterVisitors.h.

Referenced by clang::ento::bugreporter::StoreHandler::constructNote(), and showBRDiagnostics().

◆ Value

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

Symbolic value that is being stored.

Definition at line 154 of file BugReporterVisitors.h.

Referenced by showBRDefaultDiagnostics(), showBRDiagnostics(), and showBRParamDiagnostics().


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