clang  15.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::dataflow::StructValue Class Referencefinal

Models a value of struct or class type, with a flat map of fields to child storage locations, containing all accessible members of base struct and class types. More...

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

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

Public Member Functions

 StructValue ()
 
 StructValue (llvm::DenseMap< const ValueDecl *, Value * > Children)
 
ValuegetChild (const ValueDecl &D) const
 Returns the child value that is assigned for D or null if the child is not initialized. More...
 
void setChild (const ValueDecl &D, Value &Val)
 Assigns Val as the child value for D. More...
 
- Public Member Functions inherited from clang::dataflow::Value
 Value (Kind ValKind)
 
 Value (const Value &)=delete
 
Valueoperator= (const Value &)=delete
 
virtual ~Value ()=default
 
Kind getKind () const
 
ValuegetProperty (llvm::StringRef Name) const
 Returns the value of the synthetic property with the given Name or null if the property isn't assigned a value. More...
 
void setProperty (llvm::StringRef Name, Value &Val)
 Assigns Val as the value of the synthetic property with the given Name. More...
 

Static Public Member Functions

static bool classof (const Value *Val)
 

Additional Inherited Members

- Public Types inherited from clang::dataflow::Value
enum  Kind {
  Kind::Integer, Kind::Reference, Kind::Pointer, Kind::Struct,
  Kind::AtomicBool, Kind::Conjunction, Kind::Disjunction, Kind::Negation
}
 

Detailed Description

Models a value of struct or class type, with a flat map of fields to child storage locations, containing all accessible members of base struct and class types.

Definition at line 211 of file Value.h.

Constructor & Destructor Documentation

◆ StructValue() [1/2]

clang::dataflow::StructValue::StructValue ( )
inline

Definition at line 213 of file Value.h.

◆ StructValue() [2/2]

clang::dataflow::StructValue::StructValue ( llvm::DenseMap< const ValueDecl *, Value * >  Children)
inlineexplicit

Definition at line 215 of file Value.h.

Member Function Documentation

◆ classof()

static bool clang::dataflow::StructValue::classof ( const Value Val)
inlinestatic

Definition at line 218 of file Value.h.

References clang::dataflow::Value::getKind(), and clang::dataflow::Value::Struct.

◆ getChild()

Value* clang::dataflow::StructValue::getChild ( const ValueDecl D) const
inline

Returns the child value that is assigned for D or null if the child is not initialized.

Definition at line 224 of file Value.h.

◆ setChild()

void clang::dataflow::StructValue::setChild ( const ValueDecl D,
Value Val 
)
inline

Assigns Val as the child value for D.

Definition at line 232 of file Value.h.

Referenced by clang::dataflow::Environment::setValue().


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