clang 17.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.
 
void setChild (const ValueDecl &D, Value &Val)
 Assigns Val as the child value for D.
 
- 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.
 
void setProperty (llvm::StringRef Name, Value &Val)
 Assigns Val as the value of the synthetic property with the given Name.
 

Static Public Member Functions

static bool classof (const Value *Val)
 

Additional Inherited Members

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

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 287 of file Value.h.

Constructor & Destructor Documentation

◆ StructValue() [1/2]

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

Definition at line 289 of file Value.h.

◆ StructValue() [2/2]

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

Definition at line 291 of file Value.h.

Member Function Documentation

◆ classof()

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

Definition at line 294 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 300 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 308 of file Value.h.

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


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