clang 23.0.0git
clang::lifetimes::internal::ExpireFact Class Reference

When an AccessPath expires (e.g., a variable goes out of scope), all loans that are associated with this path expire. More...

#include "clang/Analysis/Analyses/LifetimeSafety/Facts.h"

Inheritance diagram for clang::lifetimes::internal::ExpireFact:
[legend]

Public Member Functions

 ExpireFact (AccessPath AP, SourceLocation ExpiryLoc, std::optional< OriginID > OID=std::nullopt)
const AccessPathgetAccessPath () const
std::optional< OriginIDgetOriginID () const
SourceLocation getExpiryLoc () const
void dump (llvm::raw_ostream &OS, const LoanManager &LM, const OriginManager &OM) const override
Public Member Functions inherited from clang::lifetimes::internal::Fact
virtual ~Fact ()=default
Kind getKind () const
void setID (FactID ID)
FactID getID () const
template<typename T>
const T * getAs () const

Static Public Member Functions

static bool classof (const Fact *F)

Additional Inherited Members

Public Types inherited from clang::lifetimes::internal::Fact
enum class  Kind : uint8_t {
  Issue , Expire , OriginFlow , Use ,
  MovedOrigin , TestPoint , OriginEscapes , InvalidateOrigin
}
Protected Member Functions inherited from clang::lifetimes::internal::Fact
 Fact (Kind K)

Detailed Description

When an AccessPath expires (e.g., a variable goes out of scope), all loans that are associated with this path expire.

For example, if x expires, then the loan to x expires.

Definition at line 108 of file Facts.h.

Constructor & Destructor Documentation

◆ ExpireFact()

clang::lifetimes::internal::ExpireFact::ExpireFact ( AccessPath AP,
SourceLocation ExpiryLoc,
std::optional< OriginID > OID = std::nullopt )
inline

Member Function Documentation

◆ classof()

bool clang::lifetimes::internal::ExpireFact::classof ( const Fact * F)
inlinestatic

◆ dump()

void clang::lifetimes::internal::ExpireFact::dump ( llvm::raw_ostream & OS,
const LoanManager & LM,
const OriginManager & OM ) const
overridevirtual

◆ getAccessPath()

const AccessPath & clang::lifetimes::internal::ExpireFact::getAccessPath ( ) const
inline

Definition at line 123 of file Facts.h.

Referenced by dump().

◆ getExpiryLoc()

SourceLocation clang::lifetimes::internal::ExpireFact::getExpiryLoc ( ) const
inline

Definition at line 125 of file Facts.h.

◆ getOriginID()

std::optional< OriginID > clang::lifetimes::internal::ExpireFact::getOriginID ( ) const
inline

Definition at line 124 of file Facts.h.

Referenced by dump().


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