clang 22.0.0git
clang::lifetimes::internal::Loan Class Referenceabstract

An abstract base class for a single "Loan" which represents lending a storage in memory. More...

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

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

Public Types

enum class  Kind : uint8_t { Path , Placeholder }
 TODO: Represent opaque loans. More...

Public Member Functions

 Loan (Kind K, LoanID ID)
virtual ~Loan ()=default
Kind getKind () const
LoanID getID () const
virtual void dump (llvm::raw_ostream &OS) const =0

Detailed Description

An abstract base class for a single "Loan" which represents lending a storage in memory.

Definition at line 39 of file Loans.h.

Member Enumeration Documentation

◆ Kind

enum class clang::lifetimes::internal::Loan::Kind : uint8_t
strong

TODO: Represent opaque loans.

TODO: Represent nullptr: loans to no path. Accessing it UB! Currently it is represented as empty LoanSet

Enumerator
Path 

A loan with an access path to a storage location.

Placeholder 

A non-expiring placeholder loan for a parameter, representing a borrow from the function's caller.

Definition at line 44 of file Loans.h.

Constructor & Destructor Documentation

◆ Loan()

◆ ~Loan()

virtual clang::lifetimes::internal::Loan::~Loan ( )
virtualdefault

Member Function Documentation

◆ dump()

virtual void clang::lifetimes::internal::Loan::dump ( llvm::raw_ostream & OS) const
pure virtual

◆ getID()

LoanID clang::lifetimes::internal::Loan::getID ( ) const
inline

◆ getKind()

Kind clang::lifetimes::internal::Loan::getKind ( ) const
inline

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