clang 17.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::dataflow::AggregateStorageLocation Class Referencefinal

A storage location which is subdivided into smaller storage locations that can be traced independently by abstract interpretation. More...

#include "clang/Analysis/FlowSensitive/StorageLocation.h"

Inheritance diagram for clang::dataflow::AggregateStorageLocation:
Inheritance graph
[legend]
Collaboration diagram for clang::dataflow::AggregateStorageLocation:
Collaboration graph
[legend]

Public Member Functions

 AggregateStorageLocation (QualType Type)
 
 AggregateStorageLocation (QualType Type, llvm::DenseMap< const ValueDecl *, StorageLocation * > Children)
 
StorageLocationgetChild (const ValueDecl &D) const
 Returns the child storage location for D.
 
- Public Member Functions inherited from clang::dataflow::StorageLocation
 StorageLocation (Kind LocKind, QualType Type)
 
 StorageLocation (const StorageLocation &)=delete
 
StorageLocationoperator= (const StorageLocation &)=delete
 
virtual ~StorageLocation ()=default
 
Kind getKind () const
 
QualType getType () const
 

Static Public Member Functions

static bool classof (const StorageLocation *Loc)
 

Additional Inherited Members

- Public Types inherited from clang::dataflow::StorageLocation
enum class  Kind { Scalar , Aggregate }
 

Detailed Description

A storage location which is subdivided into smaller storage locations that can be traced independently by abstract interpretation.

For example: a struct with public members. The child map is flat, so when used for a struct or class type, all accessible members of base struct and class types are directly accesible as children of this location. FIXME: Currently, the storage location of unions is modelled the same way as that of structs or classes. Eventually, we need to change this modelling so that all of the members of a given union have the same storage location.

Definition at line 71 of file StorageLocation.h.

Constructor & Destructor Documentation

◆ AggregateStorageLocation() [1/2]

clang::dataflow::AggregateStorageLocation::AggregateStorageLocation ( QualType  Type)
inlineexplicit

Definition at line 73 of file StorageLocation.h.

◆ AggregateStorageLocation() [2/2]

clang::dataflow::AggregateStorageLocation::AggregateStorageLocation ( QualType  Type,
llvm::DenseMap< const ValueDecl *, StorageLocation * >  Children 
)
inline

Definition at line 77 of file StorageLocation.h.

Member Function Documentation

◆ classof()

static bool clang::dataflow::AggregateStorageLocation::classof ( const StorageLocation Loc)
inlinestatic

◆ getChild()

StorageLocation & clang::dataflow::AggregateStorageLocation::getChild ( const ValueDecl D) const
inline

Returns the child storage location for D.

Definition at line 87 of file StorageLocation.h.


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